mirror of
https://github.com/Redocly/redoc.git
synced 2025-01-31 01:54:08 +03:00
fix: parse json theme string for standalone tag (#1492)
This commit is contained in:
parent
22cc5f17dc
commit
d7a0a4da17
|
@ -32,7 +32,8 @@ function parseOptionsFromElement(element: Element) {
|
|||
const res = {};
|
||||
for (const attrName in attrMap) {
|
||||
const optionName = attrName.replace(/-(.)/g, (_, $1) => $1.toUpperCase());
|
||||
res[optionName] = attrMap[attrName];
|
||||
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