fix types

pull/501/head
undefined 2 years ago
parent d6cd5579b6
commit 4d29d5472f

@ -50,7 +50,7 @@ interface ServiceWorkerConfig {
let config: ServiceWorkerConfig = null;
function initConfig() {
config = JSON.parse(new URL(location).searchParams.get('config'));
config = JSON.parse(new URLSearchParams(location.search).get('config'));
config.hosts ||= [];
if (!config.domains?.length) config.domains = [location.host];
console.log('Config:', config);

Loading…
Cancel
Save