From 5fb8946a52da5d2969c374950703b13885e60d30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6=20=28skjnldsv=29?= Date: Sat, 5 Jun 2021 11:17:46 +0200 Subject: [PATCH] Remove deprecation on open method MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ (skjnldsv) --- src/services/Viewer.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/services/Viewer.js b/src/services/Viewer.js index 823088331..950258050 100644 --- a/src/services/Viewer.js +++ b/src/services/Viewer.js @@ -164,10 +164,8 @@ export default class Viewer { * @param {Function} options.onClose callback when closing the viewer */ open({ path, list = [], loadMore = () => ([]), canLoop = true, onPrev = () => {}, onNext = () => {}, onClose = () => {} } = {}) { - // TODO: remove legacy method in NC 20 ? if (typeof arguments[0] === 'string') { - path = arguments[0] - console.warn('Opening the viewer with a single string parameter is deprecated. Please use a destructuring object instead', `OCA.Viewer.open({ path: '${path}' })`) + throw new Error('Opening the viewer with a single string parameter is deprecated. Please use a destructuring object instead', `OCA.Viewer.open({ path: '${path}' })`) } if (!path.startsWith('/')) {