Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
rakuyoMo committed Feb 25, 2022
2 parents 7514d2e + 05a7966 commit 037c898
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion JSONPreview/JSONPreview/Core/JSONTextView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ extension JSONTextView {
let startIndex = text.startIndex

// Prevent the click logic from triggering when the line break is clicked.
guard text[text.index(startIndex, offsetBy: characterIndex)] != "\n" else { return }
let index = text.index(startIndex, offsetBy: characterIndex)
guard index < text.endIndex, text[index] != "\n" else { return }

let callbackBlock = {
self.clickDelegate?.textView(self, didClickZoomAt: point.y)
Expand Down

0 comments on commit 037c898

Please sign in to comment.