@@ -376,7 +376,10 @@ func getRefText(c *gin.Context) {
}
id := arg["id"].(string)
- model.FlushTxQueue()
+ if util.InvalidIDPattern(id, ret) {
+ return
+ }
+
refText := model.GetBlockRefText(id)
if "" == refText {
// 空块返回 id https://github.com/siyuan-note/siyuan/issues/10259
@@ -204,6 +204,8 @@ func GetDocsInfo(blockIDs []string, queryRefCount bool, queryAv bool) (rets []*B
func GetBlockRefText(id string) string {
+ FlushTxQueue()
bt := treenode.GetBlockTree(id)
if nil == bt {
return ErrBlockNotFound.Error()