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

Vanessab2ec5892aaec
diff --git a/app/src/util/pathName.ts b/app/src/util/pathName.ts
index 2193ed55b0..4a2510a933 100644
--- a/app/src/util/pathName.ts
+++ b/app/src/util/pathName.ts
@@ -339,17 +339,16 @@ export const movePathTo = (cb: (toPath: string[], toNotebook: string[]) => void,
inputEvent(event);
});
inputElement.addEventListener("blur", () => {
- if (!inputElement.value) {
- return;
- }
- let list: string[] = window.siyuan.storage[Constants.LOCAL_MOVE_PATH].keys;
- list.splice(0, 0, inputElement.value);
- list = Array.from(new Set(list));
- if (list.length > window.siyuan.config.search.limit) {
- list.splice(window.siyuan.config.search.limit, list.length - window.siyuan.config.search.limit);
+ if (inputElement.value) {
+ let list: string[] = window.siyuan.storage[Constants.LOCAL_MOVE_PATH].keys;
+ list.splice(0, 0, inputElement.value);
+ list = Array.from(new Set(list));
+ if (list.length > window.siyuan.config.search.limit) {
+ list.splice(window.siyuan.config.search.limit, list.length - window.siyuan.config.search.limit);
+ }
+ window.siyuan.storage[Constants.LOCAL_MOVE_PATH].keys = list;
}
window.siyuan.storage[Constants.LOCAL_MOVE_PATH].k = inputElement.value;
- window.siyuan.storage[Constants.LOCAL_MOVE_PATH].keys = list;
setStorageVal(Constants.LOCAL_MOVE_PATH, window.siyuan.storage[Constants.LOCAL_MOVE_PATH]);
});
const lineHeight = 28;