mirror of
https://github.com/Redocly/redoc.git
synced 2025-02-07 13:30:33 +03:00
fix: fix passing boolean value to showExtensions options (#1211)
Co-authored-by: Alef <aleksey.pavlov@corp.mail.ru>
This commit is contained in:
parent
afc7a95f13
commit
c6eaa0281b
|
@ -112,11 +112,18 @@ export class RedocNormalizedOptions {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof value === 'string') {
|
if (typeof value !== 'string') {
|
||||||
return value.split(',').map(ext => ext.trim());
|
return value
|
||||||
}
|
}
|
||||||
|
|
||||||
return value;
|
switch (value) {
|
||||||
|
case 'true':
|
||||||
|
return true
|
||||||
|
case 'false':
|
||||||
|
return false
|
||||||
|
default:
|
||||||
|
return value.split(',').map(ext => ext.trim());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static normalizePayloadSampleIdx(value: RedocRawOptions['payloadSampleIdx']): number {
|
static normalizePayloadSampleIdx(value: RedocRawOptions['payloadSampleIdx']): number {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user