From d26e78f9d138ca62b06e7bded4d96d549b3b70ff Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 6 May 2024 10:59:07 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/11233 --- app/src/protyle/render/av/relation.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/protyle/render/av/relation.ts b/app/src/protyle/render/av/relation.ts index bafcd8629..9af5424aa 100644 --- a/app/src/protyle/render/av/relation.ts +++ b/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