diff --git a/src/renderer/patches/spellCheck.tsx b/src/renderer/patches/spellCheck.tsx index 5396b49..89b8868 100644 --- a/src/renderer/patches/spellCheck.tsx +++ b/src/renderer/patches/spellCheck.tsx @@ -56,7 +56,7 @@ addContextMenuPatch("textarea-context", children => { const settings = useSettings(); const spellCheckLanguages = (settings.spellCheckLanguages ??= [...new Set(navigator.languages)]); - const pasteSectionIndex = children.findIndex(c => c?.props?.children?.some(c => c?.props?.id === "paste")); + const pasteSectionIndex = children.findIndex(c => c?.props?.children?.some?.(c => c?.props?.id === "paste")); children.splice( pasteSectionIndex === -1 ? children.length : pasteSectionIndex,