mirror of
https://github.com/Redocly/redoc.git
synced 2025-08-07 13:44:54 +03:00
Update src/standalone.tsx
This commit is contained in:
parent
419dbc71f0
commit
8c2f6cf11c
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user