fix passing boolean value to showExtensions options via docker

This commit is contained in:
Alef 2020-03-20 15:12:03 +03:00
parent afc7a95f13
commit 6a7bc42fc5

View File

@ -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 {