Skip to content

Commit

Permalink
refactor: validateStringOption else if
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewLeedham authored and nicolo-ribaudo committed May 24, 2020
1 parent 4afeef5 commit 8c56e76
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/babel-preset-env/src/normalize-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,7 @@ export const validateStringOption = (
) => {
if (typeof value === "undefined") {
value = defaultValue;
}

if (typeof value !== "string" && typeof value !== "undefined") {
} else if (typeof value !== "string") {
throw new Error(`Preset env: '${name}' option must be a string.`);
}

Expand Down

0 comments on commit 8c56e76

Please sign in to comment.