From dd28bdcb5444c9a00ce2280adef703d812cc428c Mon Sep 17 00:00:00 2001 From: CrispyPin Date: Tue, 8 Jun 2021 18:31:35 +0200 Subject: [PATCH] settings: ignore invalid keys --- ovr-utils/addons/settings-manager/settings_manager.gd | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ovr-utils/addons/settings-manager/settings_manager.gd b/ovr-utils/addons/settings-manager/settings_manager.gd index d1ad0e5..b694212 100644 --- a/ovr-utils/addons/settings-manager/settings_manager.gd +++ b/ovr-utils/addons/settings-manager/settings_manager.gd @@ -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