From 3b04d3199c3d057a5f1b83f833bedba208e94977 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Fri, 14 Mar 2025 11:05:49 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/14354 --- app/src/protyle/render/av/cell.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/protyle/render/av/cell.ts b/app/src/protyle/render/av/cell.ts index 1d37a011c..73d26c71e 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);