From 0df5b304cb4ae3f7235d9aa2bfbac469376a5166 Mon Sep 17 00:00:00 2001 From: Valeri Karpov Date: Thu, 9 May 2024 11:21:37 -0400 Subject: [PATCH] Update lib/utils.js Co-authored-by: Sean Derrow --- lib/utils.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/utils.js b/lib/utils.js index 8ab53bd12e1..bb2d9065490 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -267,6 +267,8 @@ exports.merge = function merge(to, from, options, path) { if (to[key] == null) { if (isPOJO(from[key])) { to[key] = { ...from[key] }; + } else if (Array.isArray(from[key])) { + to[key] = from[key].slice(); } else { to[key] = from[key]; }