From 49eeb97c60a783377be842e2e2a1132a124f42e6 Mon Sep 17 00:00:00 2001 From: steel1990 Date: Mon, 20 Feb 2017 12:49:32 +0800 Subject: [PATCH] fix ios9 TypedArray.subarray(from, undefined) bug --- src/animation/AnimationUtils.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/animation/AnimationUtils.js b/src/animation/AnimationUtils.js index a4ada76d16..88ef5ec00c 100644 --- a/src/animation/AnimationUtils.js +++ b/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 ) ); } -- GitLab