Sfoglia il codice sorgente

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

Vanessa 1 anno fa
parent
commit
d26e78f9d1
1 ha cambiato i file con 5 aggiunte e 2 eliminazioni
  1. 5 2
      app/src/protyle/render/av/relation.ts

+ 5 - 2
app/src/protyle/render/av/relation.ts

@@ -9,8 +9,11 @@ import {updateAttrViewCellAnimation} from "./action";
 import {focusBlock} from "../../util/selection";
 import {setPosition} from "../../../util/setPosition";
 
-const genSearchList = (element: Element, keyword: string, avId: string, excludes = true, cb?: () => void) => {
-    fetchPost("/api/av/searchAttributeView", {keyword, excludes: excludes ? [avId] : undefined}, (response) => {
+const genSearchList = (element: Element, keyword: string, avId?: string, excludes = true, cb?: () => void) => {
+    fetchPost("/api/av/searchAttributeView", {
+        keyword,
+        excludes: (excludes && avId) ? [avId] : undefined
+    }, (response) => {
         let html = "";
         response.data.results.forEach((item: {
             avID: string