Skip to content

Commit

Permalink
fix infinite loop crash - issue Juanpe#495
Browse files Browse the repository at this point in the history
Fix an infinite loop caused by calling skeletonLayoutSubviews within itself. This sometimes can cause an infinite loop and a crash.
  • Loading branch information
perfectionaq committed Jul 2, 2024
1 parent 30c92f0 commit 3433287
Showing 1 changed file with 0 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ extension UIView {

@objc func skeletonLayoutSubviews() {
guard Thread.isMainThread else { return }
skeletonLayoutSubviews()
guard sk.isSkeletonActive else { return }
layoutSkeletonIfNeeded()
}
Expand Down

0 comments on commit 3433287

Please sign in to comment.