Browse Source

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

Daniel 1 year ago
parent
commit
c7d9b18b80
1 changed files with 1 additions and 1 deletions
  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 = append(blockIDs, blockID)
 	blockIDs = gulu.Str.RemoveDuplicatedElem(blockIDs)
 	blockIDs = gulu.Str.RemoveDuplicatedElem(blockIDs)
 	avBlocks[avID] = blockIDs
 	avBlocks[avID] = blockIDs
-	ret = oldLen != len(blockIDs)
+	ret = oldLen != len(blockIDs) && 0 != oldLen
 
 
 	data, err := msgpack.Marshal(avBlocks)
 	data, err := msgpack.Marshal(avBlocks)
 	if nil != err {
 	if nil != err {