diff --git a/src/components/inlineWikilinkDom.ts b/src/components/inlineWikilinkDom.ts index 27c57b1e..08f4115f 100644 --- a/src/components/inlineWikilinkDom.ts +++ b/src/components/inlineWikilinkDom.ts @@ -95,7 +95,7 @@ function boundaryForChip( index: number, remaining: number, ): { boundary: SelectionBoundary | null; remaining: number } { - const tokenLength = chipToken(child.dataset.chipTarget).length + const tokenLength = chipToken(child.dataset.chipTarget ?? '').length if (remaining <= 0) { return { boundary: { container: node, offset: index }, diff --git a/src/components/inlineWikilinkKeydown.ts b/src/components/inlineWikilinkKeydown.ts index 28faad62..1c71485a 100644 --- a/src/components/inlineWikilinkKeydown.ts +++ b/src/components/inlineWikilinkKeydown.ts @@ -70,7 +70,7 @@ function handleInsertText({ onInsertText, }: HandleInsertTextArgs): boolean { if (event.metaKey || event.ctrlKey || event.altKey) return false - if (event.isComposing) return false + if (event.nativeEvent.isComposing) return false if (event.key.length !== 1) return false event.preventDefault()