fix spellcheck (#1163)

This commit is contained in:
Cookie
2025-06-20 13:29:13 -04:00
committed by GitHub
parent 6950e0b03a
commit 3cd4e94762

View File

@@ -56,7 +56,7 @@ addContextMenuPatch("textarea-context", children => {
const settings = useSettings(); const settings = useSettings();
const spellCheckLanguages = (settings.spellCheckLanguages ??= [...new Set(navigator.languages)]); 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( children.splice(
pasteSectionIndex === -1 ? children.length : pasteSectionIndex, pasteSectionIndex === -1 ? children.length : pasteSectionIndex,