mirror of
https://github.com/Redocly/redoc.git
synced 2025-01-31 10:04:08 +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;
|
||||
}
|
||||
|
||||
if (typeof value === 'string') {
|
||||
return value.split(',').map(ext => ext.trim());
|
||||
if (typeof value !== 'string') {
|
||||
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 {
|
||||
|
|
Loading…
Reference in New Issue
Block a user