Skip to content

Commit

Permalink
Remove old animation layer when creating a new animation layer (airbn…
Browse files Browse the repository at this point in the history
  • Loading branch information
junjielu authored and Igor Moroz committed May 22, 2024
1 parent 35dc12d commit 9ce0f6b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Sources/Public/Animation/LottieAnimationLayer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1143,6 +1143,7 @@ public class LottieAnimationLayer: CALayer {

if let oldAnimation = animationLayer {
oldAnimation.removeFromSuperlayer()
rootAnimationLayer = nil
}

guard let animation = animation else {
Expand Down

0 comments on commit 9ce0f6b

Please sign in to comment.