Check that type matches before using local value

This commit is contained in:
Thomas Weber committed 2020-10-07 15:47:29 -05:00
1 parent af79f391b5
commit 01fd2bf64d
1 file changed
+1 -1
+1 -1
View File
@@ -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);