diff --git a/src/components/inlineWikilinkDom.ts b/src/components/inlineWikilinkDom.ts index f32c7773..3640df49 100644 --- a/src/components/inlineWikilinkDom.ts +++ b/src/components/inlineWikilinkDom.ts @@ -84,7 +84,7 @@ function findTextBoundaryAtEdge( } const children = Array.from(node.childNodes) - const orderedChildren = edge === 'start' ? children : children.toReversed() + const orderedChildren = edge === 'start' ? children : [...children].reverse() for (const child of orderedChildren) { const boundary = findTextBoundaryAtEdge(child, edge)