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

Vanessa00d80270a1d2
diff --git a/app/src/protyle/render/av/gallery/item.ts b/app/src/protyle/render/av/gallery/item.ts
index b0b5f300ec..ec41879760 100644
--- a/app/src/protyle/render/av/gallery/item.ts
+++ b/app/src/protyle/render/av/gallery/item.ts
@@ -66,7 +66,7 @@ ${fieldType === "block" ? ' data-detached="true"' : ""}>${renderCell(genCellValu
if (sideItemElement) {
sideItemElement.insertAdjacentHTML("afterend", html);
} else {
- options.blockElement.querySelector(groupQuery + ".av__gallery").insertAdjacentHTML("afterbegin", html);
+ options.blockElement.querySelector(groupQuery + ".av__gallery")?.insertAdjacentHTML("afterbegin", html);
}
fetchPost("/api/av/getAttributeViewAddingBlockDefaultValues", {
avID: options.blockElement.getAttribute("data-av-id"),
diff --git a/app/src/protyle/render/av/row.ts b/app/src/protyle/render/av/row.ts
index 7e31135a72..8e0c496939 100644
--- a/app/src/protyle/render/av/row.ts
+++ b/app/src/protyle/render/av/row.ts
@@ -131,9 +131,9 @@ export const insertAttrViewBlockAnimation = (options: {
if (bodyElement && ["updated", "created"].includes(bodyElement.getAttribute("data-dtype")) &&
bodyElement.getAttribute("data-content") !== "_@today@_") {
previousElement = options.blockElement.querySelector('.av__body[data-content="_@today@_"] .av__row--util')?.previousElementSibling;
- if (!previousElement) {
- return;
- }
+ }
+ if (!previousElement) {
+ return;
}
let cellsHTML = '<div class="av__colsticky"><div class="av__firstcol"><svg><use xlink:href="#iconUncheck"></use></svg></div></div>';
const pinIndex = previousElement.querySelectorAll(".av__colsticky .av__cell").length - 1;