Skip to content

Commit 4e80374

Browse files
committed
Check for empty data blob when deserializing protos
1 parent ab56271 commit 4e80374

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

chasm/tree.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1184,7 +1184,7 @@ func unmarshalProto(
11841184

11851185
value := reflect.New(valueT.Elem())
11861186

1187-
if dataBlob == nil {
1187+
if dataBlob == nil || len(dataBlob.Data) == 0 {
11881188
// If the original data is the zero value of its type, the dataBlob loaded from persistence layer will be nil.
11891189
// But we know for component & data nodes, they won't get persisted in the first place if there's no data,
11901190
// so it must be a zero value.

0 commit comments

Comments
 (0)