Add early return for empty highlights
This commit is contained in:
parent
bb822f0bbc
commit
17a80ab0a9
@ -366,6 +366,7 @@ class BesService {
|
||||
const scrollX = scrollPanelRect.left
|
||||
const scrollY = scrollPanelRect.top
|
||||
match.highlights = Array.from(range.getClientRects())
|
||||
if (match.highlights.length === 0) return
|
||||
const dpr = window.devicePixelRatio
|
||||
this.ctx.lineWidth = 2 * dpr // Use 2 for clearer visibility
|
||||
const ruleId = match.match.rule.id
|
||||
|
Loading…
x
Reference in New Issue
Block a user