From dd973963b586c111865fc4e8c2997ea83d67a962 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Mon, 24 Jun 2024 07:25:02 +0800 Subject: [PATCH] :bug: Fix NPE https://github.com/siyuan-note/siyuan/issues/11805 --- kernel/model/attribute_view.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.go index f080dec3c..25bfbfcd9 100644 --- a/kernel/model/attribute_view.go +++ b/kernel/model/attribute_view.go @@ -2835,7 +2835,7 @@ func replaceAttributeViewBlock(operation *Operation, tx *Transaction) (err error // 检查是否已经存在绑定块,如果存在的话则重新绑定 for _, keyValues := range attrView.KeyValues { for _, value := range keyValues.Values { - if value.BlockID == operation.NextID { + if av.KeyTypeBlock == value.Type && nil != value.Block && value.BlockID == operation.NextID { if !operation.IsDetached { bindBlockAv0(tx, operation.AvID, node, tree) value.IsDetached = false