diff --git a/src/components/compose.jsx b/src/components/compose.jsx index 248b80ed..120b79e5 100644 --- a/src/components/compose.jsx +++ b/src/components/compose.jsx @@ -256,6 +256,12 @@ function Compose({ const canClose = () => { const { value, dataset } = textareaRef.current; + // check if loading + if (uiState === 'loading') { + console.log('canClose', { uiState }); + return false; + } + // check for status and media attachments const hasMediaAttachments = mediaAttachments.length > 0; if (!value && !hasMediaAttachments) { @@ -289,12 +295,6 @@ function Compose({ return true; } - // check if loading - if (uiState !== 'loading') { - console.log('canClose', { uiState }); - return true; - } - console.log('canClose', { value, hasMediaAttachments,