Skip to content

Commit f212ece

Browse files
committed
[ts] Fix incorrect handling of Physics.none in Skeleton.updateWorldTransform
1 parent 7086536 commit f212ece

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

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

0 commit comments

Comments
 (0)