From 010b6778a0cb2f7458008b525a64320f12c3c9e8 Mon Sep 17 00:00:00 2001 From: ankur22 Date: Fri, 15 Dec 2023 09:37:08 +0000 Subject: [PATCH] Update slice capacity Resolves: https://github.com/grafana/xk6-browser/pull/1135#discussion_r1426374896 --- common/remote_object.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/remote_object.go b/common/remote_object.go index a22873cc8..4e35bf9e4 100644 --- a/common/remote_object.go +++ b/common/remote_object.go @@ -249,7 +249,7 @@ func parseConsoleRemoteObjectPreview(logger *log.Logger, op *cdpruntime.ObjectPr } func parseConsoleRemoteArrayPreview(logger *log.Logger, op *cdpruntime.ObjectPreview) string { - arr := make([]any, 0) + arr := make([]any, 0, len(op.Properties)) if op.Overflow { logger.Warnf("parseConsoleRemoteArrayPreview", "array is too large and will be parsed partially") }