Skip to content

Commit c6eaa02

Browse files
GreenHedgehogAlef
andauthored
fix: fix passing boolean value to showExtensions options (#1211)
Co-authored-by: Alef <[email protected]>
1 parent afc7a95 commit c6eaa02

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/services/RedocNormalizedOptions.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,18 @@ export class RedocNormalizedOptions {
112112
return true;
113113
}
114114

115-
if (typeof value === 'string') {
116-
return value.split(',').map(ext => ext.trim());
115+
if (typeof value !== 'string') {
116+
return value
117117
}
118118

119-
return value;
119+
switch (value) {
120+
case 'true':
121+
return true
122+
case 'false':
123+
return false
124+
default:
125+
return value.split(',').map(ext => ext.trim());
126+
}
120127
}
121128

122129
static normalizePayloadSampleIdx(value: RedocRawOptions['payloadSampleIdx']): number {

0 commit comments

Comments
 (0)