瀏覽代碼

Merge pull request #21342 from ianpurvis/fix-keyframe-track-tojson

KeyframeTrack: Fix toJSON static override check
Mr.doob 4 年之前
父節點
當前提交
e8c7eaf721
共有 1 個文件被更改,包括 1 次插入1 次删除
  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 );