mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-29 07:52:50 -05:00
settings: prevent overwrites if parse called with null object
This commit is contained in:
@@ -4,12 +4,15 @@
|
||||
|
||||
function parse(root, jsonObj) {
|
||||
var SPEC = SpecModule.SPEC;
|
||||
for (var k in SPEC) {
|
||||
root[k] = SPEC[k].def;
|
||||
}
|
||||
|
||||
if (!jsonObj) return;
|
||||
|
||||
for (var k in SPEC) {
|
||||
if (!(k in jsonObj)) {
|
||||
root[k] = SPEC[k].def;
|
||||
}
|
||||
}
|
||||
|
||||
for (var k in jsonObj) {
|
||||
if (!SPEC[k]) continue;
|
||||
var raw = jsonObj[k];
|
||||
|
||||
Reference in New Issue
Block a user