Skip to content

Commit 369775c

Browse files
committed
Add protection for when the border color array is empty
1 parent d2df1f3 commit 369775c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Aztec/Classes/TextKit/LayoutManager.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,9 @@ private extension LayoutManager {
141141
let quoteCount = blockquoteBorderColors.count
142142
let index = min(depth, quoteCount-1)
143143

144-
guard index < quoteCount else {return}
144+
guard quoteCount > 0 && index < quoteCount else {
145+
return
146+
}
145147

146148
let borderColor = blockquoteBorderColors[index]
147149
let borderRect = CGRect(origin: rect.origin, size: CGSize(width: blockquoteBorderWidth, height: rect.height))

0 commit comments

Comments
 (0)