From e3338ed4b9b5174986922af3f31f8ae4da05cee1 Mon Sep 17 00:00:00 2001 From: Artem Date: Tue, 11 May 2021 19:31:33 +0300 Subject: [PATCH] Fix: latest call --- internal/bcd/ast/list.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/bcd/ast/list.go b/internal/bcd/ast/list.go index bd258acca..36da326fd 100644 --- a/internal/bcd/ast/list.go +++ b/internal/bcd/ast/list.go @@ -281,9 +281,11 @@ func (list *List) GetJSONModel(model JSONModel) { if model == nil { return } - arr := make([]JSONModel, len(list.Data)) + arr := make([]JSONModel, 0, len(list.Data)) for i := range list.Data { - list.Data[i].GetJSONModel(arr[i]) + res := make(JSONModel) + list.Data[i].GetJSONModel(res) + arr = append(arr, res) } model[list.GetName()] = arr }