Browse Source

Merge pull request #10831 from steel1990/dev

fix ios9 TypedArray.subarray(from, undefined) bug
Mr.doob 8 years ago
parent
commit
146211a349
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/animation/AnimationUtils.js

+ 3 - 1
src/animation/AnimationUtils.js

@@ -11,7 +11,9 @@ var AnimationUtils = {
 
 		if ( AnimationUtils.isTypedArray( array ) ) {
 
-			return new array.constructor( array.subarray( from, to ) );
+			// in ios9 array.subarray(from, undefined) will return empty array
+			// but array.subarray(from) or array.subarray(from, len) is correct
+			return new array.constructor( array.subarray( from, to || array.length ) );
 
 		}