Explorar o código

KeyframeTrack: Fix toJSON static override check

  Subclasses of KeyframeTrack classes will never have undefined static toJSON
Ian Purvis %!s(int64=4) %!d(string=hai) anos
pai
achega
77480d339d
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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 );