Skip to content

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

:art: fix https://github.com/siyuan-note/siyuan/issues/9700

Vanessa0c04941edc01
diff --git a/app/src/asset/pdf/view_history.js b/app/src/asset/pdf/view_history.js
index 9d66be66ec..bcbb824d35 100644
--- a/app/src/asset/pdf/view_history.js
+++ b/app/src/asset/pdf/view_history.js
@@ -13,6 +13,7 @@
* limitations under the License.
*/
+import {setStorageVal} from "../../protyle/util/compatibility";
const DEFAULT_VIEW_HISTORY_CACHE_SIZE = 20;
/**
diff --git a/app/src/search/menu.ts b/app/src/search/menu.ts
index 95dd5fd1a9..5d0f943fa1 100644
--- a/app/src/search/menu.ts
+++ b/app/src/search/menu.ts
@@ -239,7 +239,7 @@ export const saveCriterion = (config: ISearchOption,
saveDialog.destroy();
});
btnsElement[1].addEventListener("click", () => {
- const value = saveDialog.element.querySelector("input").value;
+ const value = saveDialog.element.querySelector("input").value.trim();
if (!value) {
showMessage(window.siyuan.languages["_kernel"]["142"]);
return;
diff --git a/app/src/search/util.ts b/app/src/search/util.ts
index e1cc46a751..c6e7a92ca8 100644
--- a/app/src/search/util.ts
+++ b/app/src/search/util.ts
@@ -409,7 +409,7 @@ export const genSearch = (app: App, config: ISearchOption, element: Element, clo
event.preventDefault();
break;
} else if (target.classList.contains("b3-chip__close") && type === "remove-criteria") {
- const name = target.parentElement.innerText.trim();
+ const name = target.parentElement.innerText;
fetchPost("/api/storage/removeCriterion", {name});
criteriaData.find((item, index) => {
if (item.name === name) {