mirror of
https://github.com/CrispyPin/ovr-utils.git
synced 2024-11-21 23:20: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 resize = has_flag(def, "resize")
|
||||
for key in val:
|
||||
var subdef = def.definition if resize else def.definition[key]
|
||||
_s[key] = _load_sub_setting(val[key], subdef)
|
||||
if resize:
|
||||
_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 val
|
||||
|
|
Loading…
Reference in a new issue