Skip to content
Snippets Groups Projects
Verified Commit c652a2bb authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

fix: #122

parent ca4189a8
No related branches found
No related tags found
No related merge requests found
...@@ -64,8 +64,12 @@ function initOptionsFromAttributes(element, options, mapping = {}, prefix = "dat ...@@ -64,8 +64,12 @@ function initOptionsFromAttributes(element, options, mapping = {}, prefix = "dat
value = mapping[optionName](value); value = mapping[optionName](value);
} }
const typeOfOptionValue = typeof finder.getVia(optionName); const optionValue = finder.getVia(optionName);
if (typeOfOptionValue === "boolean") {
const typeOfOptionValue = typeof optionValue;
if (optionValue === null || optionValue === undefined) {
value = null;
} else if (typeOfOptionValue === "boolean") {
value = value === "true"; value = value === "true";
} else if (typeOfOptionValue === "number") { } else if (typeOfOptionValue === "number") {
value = Number(value); value = Number(value);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment