Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Vanessa 2022-10-05 12:33:35 +08:00
commit 1715faad31
2 changed files with 5 additions and 0 deletions

View file

@ -179,6 +179,9 @@ func SwapBlockRef(refID, defID string, includeChildren bool) (err error) {
li.SetIALAttr("id", newID)
li.SetIALAttr("updated", newID[:14])
li.AppendChild(defNode)
for i := len(defNodeChildren) - 1; -1 < i; i-- {
defNode.InsertAfter(defNodeChildren[i])
}
refPivot.InsertAfter(li)
} else {
defNode.InsertAfter(refNode)

View file

@ -431,6 +431,8 @@ func BlocksWordCount(ids []string) (ret *util.BlockStatResult) {
}
func StatTree(id string) (ret *util.BlockStatResult) {
WaitForWritingFiles()
tree, _ := loadTreeByBlockID(id)
if nil == tree {
return