Skip to content

Commit 461ac91

Browse files
authored
fix: continue writing empty text case (#7574)
1 parent 8a9cc27 commit 461ac91

File tree

1 file changed

+1
-1
lines changed
  • frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/ai/operations

1 file changed

+1
-1
lines changed

frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/ai/operations/ai_writer_cubit.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ class AiWriterCubit extends Cubit<AiWriterState> {
318318
end: cursorPosition,
319319
).normalized;
320320

321-
String text = await editorState.getMarkdownInSelection(selection);
321+
String text = (await editorState.getMarkdownInSelection(selection)).trim();
322322
if (text.isEmpty) {
323323
if (state is! ReadyAiWriterState) {
324324
return;

0 commit comments

Comments
 (0)