Skip to content

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

:art: https://github.com/siyuan-note/siyuan/issues/16640

Vanessa319db401c2e7
diff --git a/app/src/protyle/wysiwyg/transaction.ts b/app/src/protyle/wysiwyg/transaction.ts
index ffec4eff01..1531e34dc1 100644
--- a/app/src/protyle/wysiwyg/transaction.ts
+++ b/app/src/protyle/wysiwyg/transaction.ts
@@ -319,7 +319,7 @@ const updateEmbed = (protyle: IProtyle, operation: IOperation) => {
};
const deleteBlock = (updateElements: Element[], id: string, protyle: IProtyle, isUndo: boolean) => {
- if (isUndo) {
+ if (isUndo && updateElements[0]) {
focusSideBlock(updateElements[0]);
}
updateElements.forEach(item => {