feat: throw error for invalid extended input

This commit is contained in:
Shohei Ueda 2020-07-17 15:49:02 +09:00 committed by GitHub
parent da2d5466d3
commit cef7a7b43d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,10 +2,10 @@ export default function getURL(os: string, extended: string, version: string): s
const extendedStr = (extended: string): string => {
if (extended === 'true') {
return 'extended_';
} else {
} else if (extended === 'false') {
return '';
// } else {
// throw new Error(`Invalid input (extended): ${extended}`);
} else {
throw new Error(`Invalid input (extended): ${extended}`);
}
};