Commit 201a2eb2 authored by Robert Knight's avatar Robert Knight

Fix typechecking errors in src/annotator/anchoring/text-position.js

parent 8a0d63a7
......@@ -28,19 +28,21 @@ export function toRange(root, start, end) {
root,
NodeFilter.SHOW_TEXT,
null, // filter
// @ts-ignore - Ignored parameter required for IE 11
false // expandEntityReferences
);
let startContainer;
let startOffset;
let startOffset = 0;
let endContainer;
let endOffset;
let endOffset = 0;
let textLength = 0;
let node;
while ((node = nodeIter.nextNode()) && (!startContainer || !endContainer)) {
const nodeText = node.nodeValue;
const nodeText = /** @type {string} */ (node.nodeValue);
if (
!startContainer &&
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment