Skip to content

Commit bb53b1e

Browse files
committed
handle array spec in type any
1 parent 74f8ee2 commit bb53b1e

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/lib/coerce.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,14 @@ exports.valObjectMeta = {
265265
requiredOpts: [],
266266
otherOpts: ['dflt', 'values', 'arrayOk'],
267267
coerceFunction: function(v, propOut, dflt) {
268-
if(v === undefined) propOut.set(dflt);
269-
else propOut.set(v);
268+
if(v === undefined) {
269+
propOut.set(dflt);
270+
} else {
271+
propOut.set(
272+
isTypedArraySpec(v) ? decodeTypedArraySpec(v) :
273+
v
274+
);
275+
}
270276
}
271277
},
272278
info_array: {

0 commit comments

Comments
 (0)