Skip to content

Commit

Permalink
Fixes #735 check 0 divide, use TimeInt.zero over 0
Browse files Browse the repository at this point in the history
Signed-off-by: Joseph Mattello <[email protected]>
  • Loading branch information
JoeMatt committed May 5, 2022
1 parent dd260a3 commit f437fe9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Sources/Animator/HeroViewPropertyViewContext.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ internal class HeroViewPropertyViewContext: HeroAnimatorViewContext {
}

override func resume(timePassed: TimeInterval, reverse: Bool) -> TimeInterval {
guard let visualEffectView = snapshot as? UIVisualEffectView else { return 0 }
guard let visualEffectView = snapshot as? UIVisualEffectView else { return .zero }
guard duration > 0 else { return .zero }
if reverse {
viewPropertyAnimator?.stopAnimation(false)
viewPropertyAnimator?.finishAnimation(at: .current)
Expand Down

0 comments on commit f437fe9

Please sign in to comment.