diff --git a/src/main/index.js b/src/main/index.js index 771cfed5037ac..52b9de779fd17 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -65,25 +65,25 @@ function runApp() { ? new Set(__FREETUBE_ALLOWED_PATHS__) : new Set() - if (process.env.NODE_ENV === 'production') { - protocol.registerSchemesAsPrivileged([ - { - scheme: 'app', - privileges: { - standard: true, - secure: true, - supportFetchAPI: true - } - }, - { - scheme: 'imagecache', - privileges: { - secure: true, - corsEnabled: true - } + protocol.registerSchemesAsPrivileged([ + { + scheme: 'imagecache', + privileges: { + secure: true, + corsEnabled: true } - ]) - } + }, + ...(process.env.NODE_ENV === 'production' + ? [{ + scheme: 'app', + privileges: { + standard: true, + secure: true, + supportFetchAPI: true + } + }] + : []), + ]) const ROOT_APP_URL = process.env.NODE_ENV === 'development' ? 'http://localhost:9080' : 'app://bundle/index.html'