Browse Source

BufferAttribute: More robust array check. Fixes 3d2dd7aba7fc7b9800276a38494e8e6fb8f91f32.

Mr.doob 9 years ago
parent
commit
f216c35b9b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/core/BufferAttribute.js

+ 1 - 1
src/core/BufferAttribute.js

@@ -10,7 +10,7 @@ import { _Math } from '../math/Math';
 
 
 function BufferAttribute( array, itemSize, normalized ) {
 function BufferAttribute( array, itemSize, normalized ) {
 
 
-	if ( array.buffer instanceof ArrayBuffer === false ) {
+	if ( Array.isArray( array ) ) {
 
 
 		throw new TypeError( 'THREE.BufferAttribute: array should be a Typed Array.' );
 		throw new TypeError( 'THREE.BufferAttribute: array should be a Typed Array.' );