From 01fd2bf64d2caa1a5ed1c90ba13c72ebfe0b8fde Mon Sep 17 00:00:00 2001 From: Thomas Weber Date: Wed, 7 Oct 2020 15:47:29 -0500 Subject: [PATCH] Check that type matches before using local value --- parseoptions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parseoptions.js b/parseoptions.js index 7a99ebe..4aa7945 100644 --- a/parseoptions.js +++ b/parseoptions.js @@ -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);