mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
fix types
This commit is contained in:
1 parent
d6cd5579b6
commit
4d29d5472f
1 file changed
+1
-1
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user