mirror of
https://github.com/purocean/yn.git
synced 2026-10-16 15:41:46 +08:00
style: fix text highlighter lint
This commit is contained in:
@@ -156,9 +156,9 @@ export function createTextHighlighter (
|
||||
|
||||
/** Highlight precomputed DOM ranges, such as ranges restored from review annotations. */
|
||||
const highlightRanges = (ranges: Range[]) => {
|
||||
const targetDocument = ranges[0]?.startContainer.ownerDocument
|
||||
|| resolveContainer()?.ownerDocument
|
||||
|| contextDocument
|
||||
const targetDocument = ranges[0]?.startContainer.ownerDocument ||
|
||||
resolveContainer()?.ownerDocument ||
|
||||
contextDocument
|
||||
|
||||
return applyRanges(ranges, targetDocument)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user