Skip to content

Commit

Permalink
Refactor guard syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
zenangst committed Jan 23, 2020
1 parent 86a450f commit 1c5c021
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lottie-swift/src/Public/Animation/AnimationView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -821,9 +821,7 @@ final public class AnimationView: LottieView {

override func animationMovedToWindow() {
/// Don't update any state if both the `superview` and `window` is `nil`
guard window != nil && superview != nil else {
return
}
guard window != nil && superview != nil else { return }

if window != nil {
updateAnimationForForegroundState()
Expand Down

0 comments on commit 1c5c021

Please sign in to comment.