From 8b41d2a85727b300d3401c388b91222b8b473a7e Mon Sep 17 00:00:00 2001 From: Jake Date: Thu, 30 Jun 2022 18:45:03 +0900 Subject: [PATCH] Null object prototype. --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 0ac71be..1aea9d8 100644 --- a/index.js +++ b/index.js @@ -52,7 +52,7 @@ function propertyIsUnsafe(target, key) { } function mergeObject(target, source, options) { - var destination = {} + var destination = Object.create(null); if (options.isMergeableObject(target)) { getKeys(target).forEach(function(key) { destination[key] = cloneUnlessOtherwiseSpecified(target[key], options)