refactor: remove unnecessary code

master
ikatyang 2017-09-09 12:09:43 +08:00
parent 97100c42c4
commit 82eaadc03a
1 changed files with 1 additions and 5 deletions

View File

@ -18,11 +18,7 @@ function normalizeDetailOptions(detailOptions) {
const normalizedValue = getValue(value, argv);
if (option.exception !== undefined) {
if (Array.isArray(option.exception)) {
if (option.exception.indexOf(normalizedValue) !== -1) {
return normalizedValue;
}
} else if (typeof option.exception === "function") {
if (typeof option.exception === "function") {
if (option.exception(normalizedValue)) {
return normalizedValue;
}