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/14354

Vanessa3b04d3199c3d
diff --git a/app/src/protyle/render/av/cell.ts b/app/src/protyle/render/av/cell.ts
index 1d37a011ce..73d26c71e1 100644
--- a/app/src/protyle/render/av/cell.ts
+++ b/app/src/protyle/render/av/cell.ts
@@ -79,7 +79,10 @@ export const genCellValueByElement = (colType: TAVCol, cellElement: HTMLElement)
if (colType === "block" && textElement.dataset.id) {
cellValue.block.id = textElement.dataset.id;
if (textElement.previousElementSibling?.classList.contains("b3-menu__avemoji")) {
- cellValue.block.icon = textElement.previousElementSibling.getAttribute("data-unicode");
+ const unicode = textElement.previousElementSibling.getAttribute("data-unicode")
+ if (unicode) {
+ cellValue.block.icon = unicode;
+ }
}
}
} else if (colType === "mSelect" || colType === "select") {
@@ -708,8 +711,6 @@ export const updateCellsValue = (protyle: IProtyle, nodeElement: HTMLElement, va
};
if (oldValue.block.icon) {
newValue.icon = oldValue.block.icon;
- } else {
- delete oldValue.block.icon;
}
}
const cellValue = genCellValue(type, newValue);