@hapi/hoek
Advanced tools
Comparing version 9.0.1 to 9.0.2
@@ -138,6 +138,2 @@ 'use strict'; | ||
if (baseProto === Types.array) { | ||
return []; | ||
} | ||
if (options.prototype === false) { // Defaults to true | ||
@@ -148,3 +144,3 @@ if (internals.needsProtoHack.has(baseProto)) { | ||
return {}; | ||
return baseProto === Types.array ? [] : {}; | ||
} | ||
@@ -159,2 +155,11 @@ | ||
if (baseProto === Types.array) { | ||
const newObj = []; | ||
if (proto !== baseProto) { | ||
Object.setPrototypeOf(newObj, proto); | ||
} | ||
return newObj; | ||
} | ||
if (internals.needsProtoHack.has(baseProto)) { | ||
@@ -161,0 +166,0 @@ const newObj = new proto.constructor(); |
{ | ||
"name": "@hapi/hoek", | ||
"description": "General purpose node utilities", | ||
"version": "9.0.1", | ||
"version": "9.0.2", | ||
"repository": "git://github.com/hapijs/hoek", | ||
@@ -6,0 +6,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
50248
1460