Przeglądaj źródła

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

Davide Tantillo 3 miesięcy temu
rodzic
commit
5e6f4cae8d
1 zmienionych plików z 1 dodań i 1 usunięć
  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: [] };
 		animationInfoObject.animations.push({
 			animationName: animationNameOrTrackIndexStringCycle,
-			loop: loopOrRepeatDelay.trim().toLowerCase() === "true",
+			loop: (loopOrRepeatDelay || "").trim().toLowerCase() === "true",
 			delay,
 			mixDuration,
 		});