Răsfoiți Sursa

[ts] Fix incorrect handling of Physics.none in Skeleton.updateWorldTransform

Mario Zechner 1 an în urmă
părinte
comite
f212ece369
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      spine-ts/spine-core/src/Skeleton.ts

+ 1 - 1
spine-ts/spine-core/src/Skeleton.ts

@@ -379,7 +379,7 @@ export class Skeleton {
 	 * See [World transforms](http://esotericsoftware.com/spine-runtime-skeletons#World-transforms) in the Spine
 	 * Runtimes Guide. */
 	updateWorldTransform (physics: Physics) {
-		if (!physics) throw new Error("physics is undefined");
+		if (physics === undefined || physics === null) throw new Error("physics is undefined");
 		let bones = this.bones;
 		for (let i = 0, n = bones.length; i < n; i++) {
 			let bone = bones[i];