From 47341dd359a9ce1d0209c5e1173bdecc401931b6 Mon Sep 17 00:00:00 2001 From: Andrew Razumovsky Date: Wed, 8 Feb 2023 04:09:34 +0200 Subject: [PATCH] fix custom merge function not working Fixes regression occurred after https://github.com/jonschlinkert/set-value/commit/cdc74463f5778f2c50b1bae839818ac76268aa51#diff-e727e4bdf3657fd1d798edcd6b099d6e092f8573cba266154583a746bba0f346R115 --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index ecf8371..51b6ada 100644 --- a/index.js +++ b/index.js @@ -112,7 +112,7 @@ const assignProp = (obj, prop, value, options) => { deleteProperty(obj, prop); } else if (options && options.merge) { - const merge = options.merge === 'function' ? options.merge : Object.assign; + const merge = typeof options.merge === 'function' ? options.merge : Object.assign; // Only merge plain objects if (merge && isPlainObject(obj[prop]) && isPlainObject(value)) {