Browse Source

fix ios9 TypedArray.subarray(from, undefined) bug

steel1990 8 years ago
parent
commit
49eeb97c60
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 ) ) {
 		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 ) );
 
 
 		}
 		}