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
556f6b82e6
commit
419dbc71f0
|
@ -32,13 +32,8 @@ function parseOptionsFromElement(element: Element) {
|
|||
const res = {};
|
||||
for (const attrName in attrMap) {
|
||||
const optionName = attrName.replace(/-(.)/g, (_, $1) => $1.toUpperCase());
|
||||
let attr = attrMap[attrName];
|
||||
|
||||
if (attrName === 'theme') {
|
||||
attr = JSON.parse(attr);
|
||||
}
|
||||
|
||||
res[optionName] = attr;
|
||||
const attr = attrMap[attrName];
|
||||
res[optionName] = attrName === 'theme' ? JSON.parse(attr) : attr;
|
||||
// TODO: normalize options
|
||||
}
|
||||
return res;
|
||||
|
|
Loading…
Reference in New Issue
Block a user