1415
1416
if dataBlob == nil || len(dataBlob.Data) == 0 {
1417
>
// If the original data is the zero value of its type, the dataBlob loaded from persistence layer will be nil.
tree.go
1418
>
// But we know for component & data nodes, they won't get persisted in the first place if there's no data,
1419
>
// so it must be a zero value.
1420
>
dataBlob = &commonpb.DataBlob{
1421
>
EncodingType: enumspb.ENCODING_TYPE_PROTO3,
1422
>
Data: []byte{},
1423
>
}
1424
>
}
1425
1426
if err := serialization.Decode(dataBlob, value.Interface().(proto.Message)); err != nil {