From fd0abd2d8ee0acb975d28312ff11932eed12cb34 Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Thu, 21 Jan 2021 06:37:23 +0000 Subject: [PATCH] Ensure diff-match-patch works on array values of arrays --- util/data/data.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/util/data/data.go b/util/data/data.go index 1a9f8120..697611e7 100644 --- a/util/data/data.go +++ b/util/data/data.go @@ -748,13 +748,7 @@ func (d *Doc) Append(value interface{}, path ...string) (*Doc, error) { return &Doc{data: nil}, fmt.Errorf("Not an array") } - if values, ok := value.([]interface{}); ok { - for _, value := range values { - a = append(a, value) - } - } else { - a = append(a, value) - } + a = append(a, value) return d.Set(a, path...)