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

Vanessaad4964103df0
diff --git a/app/src/protyle/util/editorCommonEvent.ts b/app/src/protyle/util/editorCommonEvent.ts
index 37c1e559c5..a7dea2c3e3 100644
--- a/app/src/protyle/util/editorCommonEvent.ts
+++ b/app/src/protyle/util/editorCommonEvent.ts
@@ -816,7 +816,7 @@ export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => {
return;
}
let target = event.target as HTMLElement;
- if (target.classList.contains("av__gallery-img")) {
+ if (target.classList?.contains("av__gallery-img")) {
target = hasClosestByClassName(target, "av__gallery-item") as HTMLElement;
}
if (!target) {