diff --git a/components/file-group-page.js b/components/file-group-page.js index f5a3f54..3125673 100644 --- a/components/file-group-page.js +++ b/components/file-group-page.js @@ -254,9 +254,11 @@ export class FileGroupPage extends HTMLElement { if (this.cspOff) { return undefined } else { - return this.cspProfiles[ - this.settings.networkAccess - ] ?? this.cspProfiles.local + return ( + this.settings.networkAccess in this.cspProfiles ? + this.cspProfiles[this.settings.networkAccess] : + this.cspProfiles.local + ) } } diff --git a/sw.js b/sw.js index 8b7ec33..a9f0370 100644 --- a/sw.js +++ b/sw.js @@ -19,7 +19,7 @@ async function initCache() { '/loader/editor-build.js', '/menu/dropdown.js', '/settings/page-settings.js', - ]) + ]) //1 } self.addEventListener("install", event => { @@ -55,4 +55,4 @@ self.addEventListener('fetch', event => { self.addEventListener('activate', event => { event.waitUntil(clients.claim()) -}) \ No newline at end of file +})