From 38726c7586c6a2583b7e7dcdce0c4fedd013055d Mon Sep 17 00:00:00 2001 From: Noritaka Kobayashi Date: Sun, 14 Sep 2025 18:53:01 +0900 Subject: [PATCH] refactor: change if in else to else if (#7028) Co-authored-by: Jay --- lib/utils.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/utils.js b/lib/utils.js index 0ef9366..ade8309 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -351,10 +351,8 @@ function merge(/* obj1, obj2, obj3, ... */) { result[targetKey] = merge({}, val); } else if (isArray(val)) { result[targetKey] = val.slice(); - } else { - if (!skipUndefined || !isUndefined(val)) { - result[targetKey] = val; - } + } else if (!skipUndefined || !isUndefined(val)) { + result[targetKey] = val; } }