Skip to content

Commit

Permalink
Fix condition in findNextEmptyAssistBlock method
Browse files Browse the repository at this point in the history
  • Loading branch information
ae86jack committed Mar 25, 2024
1 parent d7c7ca7 commit 6dedac9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@ export default class AIZhipuPlugin extends Plugin {
return null
}
}
return { start, end }
if (end > start) return { start, end }
return null
}

async generateText(editor: Editor, template: PromptTemplate) {
Expand Down

0 comments on commit 6dedac9

Please sign in to comment.