File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 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');
1919var counterRegex = require ( './regex' ) . counter ;
2020var DESELECTDIM = require ( '../constants/interactions' ) . DESELECTDIM ;
2121var wrap180 = require ( './angles' ) . wrap180 ;
22+ var isArrayOrTypedArray = require ( './is_array' ) . isArrayOrTypedArray ;
2223
2324exports . valObjectMeta = {
2425 data_array : {
2526 // You can use *dflt=[] to force said array to exist though.
2627 description : [
2728 '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.'
2931 ] . join ( ' ' ) ,
3032 requiredOpts : [ ] ,
3133 otherOpts : [ 'dflt' ] ,
3234 coerceFunction : function ( v , propOut , dflt ) {
33- if ( Array . isArray ( v ) ) propOut . set ( v ) ;
35+ if ( isArrayOrTypedArray ( v ) ) propOut . set ( v ) ;
3436 else if ( dflt !== undefined ) propOut . set ( dflt ) ;
3537 }
3638 } ,
You can’t perform that action at this time.
0 commit comments