From c050f3b0ecd29433cfb8ab18d636654eab9d9531 Mon Sep 17 00:00:00 2001 From: NejcZdovc Date: Fri, 23 Feb 2018 06:25:30 +0100 Subject: [PATCH] Fixes torrent merge Resolves #13268 Auditors: Test Plan: --- app/filtering.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/filtering.js b/app/filtering.js index 5b99063a90f..dd3ce3f5bd2 100644 --- a/app/filtering.js +++ b/app/filtering.js @@ -776,13 +776,12 @@ module.exports.isResourceEnabled = (resourceName, url, isPrivate) => { if (resourceName === 'pdfjs') { return getSetting(settings.PDFJS_ENABLED, settingsState) } - if (resourceName === 'webtorrent') { - return getSetting(settings.TORRENT_VIEWER_ENABLED, settingsState) - } if (resourceName === 'webtorrent') { const extension = extensionState.getExtensionById(appState, config.torrentExtensionId) - return extension !== undefined ? extension.get('enabled') : false + const torrentEnabled = getSetting(settings.TORRENT_VIEWER_ENABLED, settingsState) + const extensionEnabled = extension !== undefined ? extension.get('enabled') : false + return extensionEnabled && torrentEnabled } if (resourceName === 'ledger') {