Skip to content

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

:art: 刚创建时无 id,更新需和 oldValue 保持一致

Vanessae8017741d950
diff --git a/app/src/protyle/render/av/cell.ts b/app/src/protyle/render/av/cell.ts
index 5c4ca21cac..c909c551e5 100644
--- a/app/src/protyle/render/av/cell.ts
+++ b/app/src/protyle/render/av/cell.ts
@@ -554,8 +554,8 @@ export const updateCellsValue = (protyle: IProtyle, nodeElement: HTMLElement, va
}
const rowID = rowElement.getAttribute("data-id");
- const cellId = item.getAttribute("data-id");
- const colId = item.getAttribute("data-col-id");
+ const cellId = item.dataset.id; // 刚创建时无 id,更新需和 oldValue 保持一致
+ const colId = item.dataset.colId;
text += getCellText(item) + ((cellElements[elementIndex + 1] && item.nextElementSibling && item.nextElementSibling.isSameNode(cellElements[elementIndex + 1])) ? "\t" : "\n\n");
const oldValue = genCellValueByElement(type, item);