Skip to content

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

:bug: fix https://github.com/siyuan-note/siyuan/issues/5722

Vanessace31cca404d1
diff --git a/app/src/protyle/util/paste.ts b/app/src/protyle/util/paste.ts
index 79f32ac972..64103e2698 100644
--- a/app/src/protyle/util/paste.ts
+++ b/app/src/protyle/util/paste.ts
@@ -94,10 +94,12 @@ export const paste = async (protyle: IProtyle, event: (ClipboardEvent | DragEven
Array.from(xmlDom.getElementsByTagName("string")).forEach(item => {
localFiles.push(item.childNodes[0].nodeValue);
});
- uploadLocalFiles(localFiles, protyle);
- writeText("");
+ if (localFiles.length > 0) {
+ uploadLocalFiles(localFiles, protyle);
+ writeText("");
+ return;
+ }
/// #endif
- return;
} else {
const xmlString = await fetchSyncPost("/api/clipboard/readFilePaths", {});
if (xmlString.data.length > 0) {