Skip to content

Commit 6597359

Browse files
committed
fix json unmarshal when describing
1 parent a5cddcd commit 6597359

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

describe/workload.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,10 @@ func describeWorkloadStatuses(workloadStatuses []*corepb.WorkloadStatus) {
103103

104104
// extensions
105105
extensions := map[string]string{}
106-
if err := json.Unmarshal(s.Extension, &extensions); err != nil {
107-
continue
106+
if len(s.Extension) != 0 {
107+
if err := json.Unmarshal(s.Extension, &extensions); err != nil {
108+
continue
109+
}
108110
}
109111
es := []string{}
110112
for k, v := range extensions {

0 commit comments

Comments
 (0)