From e426f7213018d394458c98e5f51010eaebeb6c5e Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Mon, 27 Nov 2023 15:00:39 -0600 Subject: [PATCH] ComposeForm: disable submit when there is no editorRef --- src/features/compose/components/compose-form.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/features/compose/components/compose-form.tsx b/src/features/compose/components/compose-form.tsx index adc3b05712..45771dd94b 100644 --- a/src/features/compose/components/compose-form.tsx +++ b/src/features/compose/components/compose-form.tsx @@ -108,7 +108,7 @@ const ComposeForm = ({ id, shouldCondense, autoFocus, clickab const isEmpty = !(fulltext.trim() || anyMedia); const condensed = shouldCondense && !isDraggedOver && !composeFocused && isEmpty && !isUploading; const shouldAutoFocus = autoFocus && !showSearch; - const canSubmit = !isSubmitting && !isUploading && !isChangingUpload && !isEmpty && length(fulltext) <= maxTootChars; + const canSubmit = !!editorRef.current && !isSubmitting && !isUploading && !isChangingUpload && !isEmpty && length(fulltext) <= maxTootChars; const getClickableArea = () => { return clickableAreaRef ? clickableAreaRef.current : formRef.current;