Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:bug:

Vanessa522d2dc465b1
diff --git a/app/src/util/backForward.ts b/app/src/util/backForward.ts
index a34ef41086..4bf99c63f6 100644
--- a/app/src/util/backForward.ts
+++ b/app/src/util/backForward.ts
@@ -254,7 +254,7 @@ export const pushBack = (protyle: IProtyle, range?: Range, blockElement?: Elemen
if (!protyle.model) {
return;
}
- if (!blockElement) {
+ if (!blockElement && range) {
blockElement = hasClosestBlock(range.startContainer) as Element;
}
if (!blockElement) {