Browse Source

KeyframeTrack: Fix toJSON static override check

  Subclasses of KeyframeTrack classes will never have undefined static toJSON
Ian Purvis 4 năm trước cách đây
mục cha
commit
77480d339d
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/animation/KeyframeTrack.js

+ 1 - 1
src/animation/KeyframeTrack.js

@@ -34,7 +34,7 @@ class KeyframeTrack {
 		let json;
 
 		// derived classes can define a static toJSON method
-		if ( trackType.toJSON !== undefined ) {
+		if ( trackType.toJSON !== this.toJSON ) {
 
 			json = trackType.toJSON( track );