1
0
Fork 0
mirror of https://github.com/anyproto/anytype-heart.git synced 2025-06-07 21:37:04 +09:00

GO-5699 Take version from last head

This commit is contained in:
kirillston 2025-06-05 11:52:45 +02:00
parent 3f04f71f76
commit c186f46bb6
No known key found for this signature in database
GPG key ID: BE4BF014F0ECDFE8

View file

@ -564,7 +564,8 @@ func (h *history) buildState(id domain.FullID, versionId string) (
}
st.BlocksInit(st)
if ch, e := tree.GetChange(tree.Id()); e == nil {
heads := tree.Heads()
if ch, e := tree.GetChange(heads[len(heads)-1]); e == nil {
participantId := domain.NewParticipantId(id.SpaceID, ch.Identity.Account())
ver = &pb.RpcHistoryVersion{
Id: ch.Id,