fix(h5-chat): resolve logged-in blank page from canSubmit TDZ
Memind CI / Test, build, and release guards (push) Failing after 4m28s

Move canSubmit above sendButtonLabel so authenticated ChatPanel render no longer throws before initialization.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-08-13 11:33:26 +08:00
parent baf89c5d04
commit 8a88cd53e8
+1 -1
View File
@@ -521,6 +521,7 @@ export function ChatPanel({
: chatState === 'waiting'
? '请求已提交…'
: null;
const canSubmit = input.trim() || pendingImages.length > 0 || pendingFiles.length > 0;
const sendButtonLabel =
uploadingImage || uploadingFile
? '上传中…'
@@ -579,7 +580,6 @@ export function ChatPanel({
};
const voiceDisabled = inputBlocked || uploadingImage || uploadingFile;
const canSubmit = input.trim() || pendingImages.length > 0 || pendingFiles.length > 0;
const uploadDisabled = !canUpload || busy || uploadingImage || uploadingFile || offlineBlocked || !!pendingTool;
const revokePendingImage = (item: PendingChatImage) => {