Check that type matches before using local value
This commit is contained in:
1 file changed
+1
-1
+1
-1
@@ -144,7 +144,7 @@ window.O = (function() {
|
||||
const possibleValues = getPossibleValues(input);
|
||||
|
||||
let value = defaultValue;
|
||||
if (typeof value !== 'object' && localValue !== null) {
|
||||
if (typeof value !== 'object' && localValue !== null && typeof localValue === typeof value) {
|
||||
if (possibleValues === null || possibleValues.includes(localValue)) {
|
||||
value = localValue;
|
||||
setValue(input, value);
|
||||
|
||||
Reference in new issue
Block a user