Switch ALLOWED_RENDERER_FILES variable from let to const (#7393)
This commit is contained in:
parent
11b6110660
commit
036b3fe0f6
@ -136,6 +136,15 @@ export default [
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
files: ['src/main/index.js'],
|
||||
languageOptions: {
|
||||
globals: {
|
||||
__FREETUBE_ALLOWED_PATHS__: 'readable'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
...eslintPluginJsonc.configs['flat/base'],
|
||||
{
|
||||
files: ['**/*.json'],
|
||||
|
@ -57,13 +57,12 @@ Options:
|
||||
|
||||
function runApp() {
|
||||
/** @type {Set<string>} */
|
||||
let ALLOWED_RENDERER_FILES
|
||||
const ALLOWED_RENDERER_FILES = process.env.NODE_ENV === 'production'
|
||||
// __FREETUBE_ALLOWED_PATHS__ is replaced by the injectAllowedPaths.mjs script
|
||||
? new Set(__FREETUBE_ALLOWED_PATHS__)
|
||||
: new Set()
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
// __FREETUBE_ALLOWED_PATHS__ is replaced by the injectAllowedPaths.mjs script
|
||||
// eslint-disable-next-line no-undef
|
||||
ALLOWED_RENDERER_FILES = new Set(__FREETUBE_ALLOWED_PATHS__)
|
||||
|
||||
protocol.registerSchemesAsPrivileged([{
|
||||
scheme: 'app',
|
||||
privileges: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user