Skip to content

Commit 476e065

Browse files
committed
Improve conditional.
1 parent ae427e5 commit 476e065

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/util.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,15 +154,16 @@ api.validateTypeValue = (v, isFrame) => {
154154

155155
if(types.isArray(v) && v.every(vv => types.isString(vv))) {
156156
return;
157-
} else if(isFrame && types.isObject(v)) {
157+
}
158+
if(isFrame && types.isObject(v)) {
158159
switch(Object.keys(v).length) {
159160
case 0:
160161
// empty object is wildcard
161162
return;
162163
case 1:
163164
// default entry is all strings
164165
if('@default' in v &&
165-
api.asArray(v['@default']).every(vv => types.isString(vv))) {
166+
api.asArray(v['@default']).every(vv => types.isString(vv))) {
166167
return;
167168
}
168169
}

0 commit comments

Comments
 (0)