浏览代码

:bug: Unable to enter title immediately after creating database Fix https://github.com/siyuan-note/siyuan/issues/11143

Daniel 1 年之前
父节点
当前提交
c7d9b18b80
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      kernel/av/mirror.go

+ 1 - 1
kernel/av/mirror.go

@@ -194,7 +194,7 @@ func UpsertBlockRel(avID, blockID string) (ret bool) {
 	blockIDs = append(blockIDs, blockID)
 	blockIDs = gulu.Str.RemoveDuplicatedElem(blockIDs)
 	avBlocks[avID] = blockIDs
-	ret = oldLen != len(blockIDs)
+	ret = oldLen != len(blockIDs) && 0 != oldLen
 
 	data, err := msgpack.Marshal(avBlocks)
 	if nil != err {