diff --git a/src/standalone.tsx b/src/standalone.tsx index 74de3e50..12b65daa 100644 --- a/src/standalone.tsx +++ b/src/standalone.tsx @@ -32,8 +32,8 @@ function parseOptionsFromElement(element: Element) { const res = {}; for (const attrName in attrMap) { const optionName = attrName.replace(/-(.)/g, (_, $1) => $1.toUpperCase()); - const attr = attrMap[attrName]; - res[optionName] = attrName === 'theme' ? JSON.parse(attr) : attr; + const optionValue = attrMap[attrName]; + res[optionName] = attrName === 'theme' ? JSON.parse(optionValue) : optionValue; // TODO: normalize options } return res;