mirror of
https://github.com/CrispyPin/ovr-utils.git
synced 2024-11-25 00:30:25 +01:00
settings: ignore invalid keys
This commit is contained in:
parent
f22efdea0a
commit
dd28bdcb54
1 changed files with 4 additions and 2 deletions
|
@ -118,8 +118,10 @@ func _load_sub_setting(val, def):
|
||||||
var _s = {}
|
var _s = {}
|
||||||
var resize = has_flag(def, "resize")
|
var resize = has_flag(def, "resize")
|
||||||
for key in val:
|
for key in val:
|
||||||
var subdef = def.definition if resize else def.definition[key]
|
if resize:
|
||||||
_s[key] = _load_sub_setting(val[key], subdef)
|
_s[key] = _load_sub_setting(val[key], def.definition)
|
||||||
|
elif def.definition.has(key):
|
||||||
|
_s[key] = _load_sub_setting(val[key], def.definition[key])
|
||||||
return _s
|
return _s
|
||||||
_:
|
_:
|
||||||
return val
|
return val
|
||||||
|
|
Loading…
Reference in a new issue