Browse Source

[ts][webcomponents] Fix empty loop param in animations.

Davide Tantillo 3 months ago
parent
commit
5e6f4cae8d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      spine-ts/spine-webcomponents/src/wcUtils.ts

+ 1 - 1
spine-ts/spine-webcomponents/src/wcUtils.ts

@@ -146,7 +146,7 @@ function castToAnimationsInfo (value: string | null): AnimationsInfo | undefined
 		const animationInfoObject = obj[trackIndexStringOrLoopDefinition] ||= { animations: [] };
 		const animationInfoObject = obj[trackIndexStringOrLoopDefinition] ||= { animations: [] };
 		animationInfoObject.animations.push({
 		animationInfoObject.animations.push({
 			animationName: animationNameOrTrackIndexStringCycle,
 			animationName: animationNameOrTrackIndexStringCycle,
-			loop: loopOrRepeatDelay.trim().toLowerCase() === "true",
+			loop: (loopOrRepeatDelay || "").trim().toLowerCase() === "true",
 			delay,
 			delay,
 			mixDuration,
 			mixDuration,
 		});
 		});