We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8153bfa commit 41e0480Copy full SHA for 41e0480
packages/selection/src/index.ts
@@ -17,7 +17,7 @@ export const getTextNodes = (startNode: Node) => {
17
const addNodeLength = (length: number, node: Node) => length + (node as Text).data.length;
18
19
const getRangePos = (container: Node, offset: number, texts: Node[]) => {
20
- const index = texts.findIndex((text) => text === container || text.parentElement === container);
+ const index = texts.findIndex(text => text === container || text.parentElement === container);
21
return index === -1 ? NaN : texts.slice(0, index).reduce(addNodeLength, 0) + offset;
22
};
23
0 commit comments