diff --git a/source/funkin/options/type/Checkbox.hx b/source/funkin/options/type/Checkbox.hx index 0659314a..5241686c 100644 --- a/source/funkin/options/type/Checkbox.hx +++ b/source/funkin/options/type/Checkbox.hx @@ -37,7 +37,8 @@ class Checkbox extends TextOption { __text.x = 100; var fieldValue = Reflect.field(parent, optionName); - checked = fieldValue != null ? fieldValue : false; + if (optionName != null) checked = Reflect.field(parent, optionName); + else checked = false; } public var firstFrame:Bool = true; diff --git a/source/funkin/options/type/NumOption.hx b/source/funkin/options/type/NumOption.hx index a98ac732..6590afd9 100644 --- a/source/funkin/options/type/NumOption.hx +++ b/source/funkin/options/type/NumOption.hx @@ -31,8 +31,7 @@ class NumOption extends TextOption { this.optionName = optionName; this.parent = parent = parent != null ? parent : Options; - var fieldValue = Reflect.field(parent, optionName); - currentSelection = fieldValue != null ? fieldValue : 0; + if (Reflect.field(parent, optionName) != null) currentSelection = Reflect.field(parent, optionName); __number = new Alphabet(0, 20, ': $currentSelection', 'bold'); super(text, desc);