File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -19,18 +19,20 @@ var nestedProperty = require('./nested_property');
19
19
var counterRegex = require ( './regex' ) . counter ;
20
20
var DESELECTDIM = require ( '../constants/interactions' ) . DESELECTDIM ;
21
21
var wrap180 = require ( './angles' ) . wrap180 ;
22
+ var isArrayOrTypedArray = require ( './is_array' ) . isArrayOrTypedArray ;
22
23
23
24
exports . valObjectMeta = {
24
25
data_array : {
25
26
// You can use *dflt=[] to force said array to exist though.
26
27
description : [
27
28
'An {array} of data.' ,
28
- 'The value MUST be an {array}, or we ignore it.'
29
+ 'The value MUST be an {array}, or we ignore it.' ,
30
+ 'Note that typed arrays (e.g. Float32Array) are supported.'
29
31
] . join ( ' ' ) ,
30
32
requiredOpts : [ ] ,
31
33
otherOpts : [ 'dflt' ] ,
32
34
coerceFunction : function ( v , propOut , dflt ) {
33
- if ( Array . isArray ( v ) ) propOut . set ( v ) ;
35
+ if ( isArrayOrTypedArray ( v ) ) propOut . set ( v ) ;
34
36
else if ( dflt !== undefined ) propOut . set ( dflt ) ;
35
37
}
36
38
} ,
You can’t perform that action at this time.
0 commit comments