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

This commit is contained in:
Mario Zechner 2024-05-14 10:17:52 +02:00
parent 70865368cd
commit f212ece369

View File

@ -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];