2
0
Эх сурвалжийг харах

Merge pull request #18628 from Mugen87/dev11

KeyframeTrack: Clarify if-clause in .trim().
Mr.doob 5 жил өмнө
parent
commit
bef4ad17e1

+ 6 - 1
src/animation/KeyframeTrack.js

@@ -254,7 +254,12 @@ Object.assign( KeyframeTrack.prototype, {
 		if ( from !== 0 || to !== nKeys ) {
 
 			// empty tracks are forbidden, so keep at least one keyframe
-			if ( from >= to ) to = Math.max( to, 1 ), from = to - 1;
+			if ( from >= to ) {
+
+				to = Math.max( to, 1 );
+				from = to - 1;
+
+			}
 
 			var stride = this.getValueSize();
 			this.times = AnimationUtils.arraySlice( times, from, to );