Skip to content

Commit

Permalink
Fixes torrent merge
Browse files Browse the repository at this point in the history
Resolves brave#13268

Auditors:

Test Plan:
  • Loading branch information
NejcZdovc committed Feb 23, 2018
1 parent 12aa8bb commit c050f3b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions app/filtering.js
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down

0 comments on commit c050f3b

Please sign in to comment.