mirror of
https://github.com/VickScarlet/lifeRestart.git
synced 2026-04-23 05:47:33 +08:00
add light theme
This commit is contained in:
+10
-4
@@ -69,10 +69,16 @@ function mapSet(target, source) {
|
||||
|
||||
function deepMapSet(target, source) {
|
||||
for(const key in source) {
|
||||
if(typeof source[key] === 'object')
|
||||
deepMapSet(target[key], source[key]);
|
||||
else
|
||||
target[key] = source[key];
|
||||
let value = source[key];
|
||||
switch(typeof value) {
|
||||
case 'function': value = value();
|
||||
case 'object':
|
||||
if(!Array.isArray(value)) {
|
||||
deepMapSet(target[key], value);
|
||||
break;
|
||||
}
|
||||
default: target[key] = value;
|
||||
}
|
||||
}
|
||||
return target;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user