Skip to content

Commit 1766731

Browse files
Fix nested if
1 parent e93eaa0 commit 1766731

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/CodeEditTextView/EmphasisManager/EmphasisManager.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,8 +330,8 @@ public final class EmphasisManager {
330330

331331
layer.add(fadeAnimation, forKey: "fadeOutAnimation")
332332

333-
if let textLayer = textLayer {
334-
if let textFadeAnimation = fadeAnimation.copy() as? CABasicAnimation {
333+
if let textLayer = textLayer, let textFadeAnimation = fadeAnimation.copy() as? CABasicAnimation {
334+
textLayer.add(textFadeAnimation, forKey: "fadeOutAnimation")
335335
textLayer.add(textFadeAnimation, forKey: "fadeOutAnimation")
336336
}
337337
}

0 commit comments

Comments
 (0)