mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-14 06:50:01 -04:00
make flags not have to all be specified
This commit is contained in:
parent
1161610cb0
commit
293aeb2956
1 changed files with 11 additions and 1 deletions
|
@ -37,7 +37,17 @@ export class ScramjetController {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
this.config = Object.assign({}, defaultConfig, config);
|
const deepMerge = (target: any, source: any): any => {
|
||||||
|
for (const key in source) {
|
||||||
|
if (source[key] instanceof Object && key in target) {
|
||||||
|
Object.assign(source[key], deepMerge(target[key], source[key]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return Object.assign(target || {}, source);
|
||||||
|
};
|
||||||
|
|
||||||
|
this.config = deepMerge(defaultConfig, config);
|
||||||
}
|
}
|
||||||
|
|
||||||
async init(serviceWorkerPath: string): Promise<ServiceWorkerRegistration> {
|
async init(serviceWorkerPath: string): Promise<ServiceWorkerRegistration> {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue