Comparing version 0.11.0 to 0.11.1
@@ -0,1 +1,11 @@ | ||
<a name="0.11.1"></a> | ||
## [0.11.1](https://github.com/boosterfuels/archetype/compare/v0.11.0...v0.11.1) (2020-02-27) | ||
### Bug Fixes | ||
* throw non-empty object $default error if passing in a date or other non-POJO ([76e7bfa](https://github.com/boosterfuels/archetype/commit/76e7bfa)) | ||
<a name="0.11.0"></a> | ||
@@ -2,0 +12,0 @@ # [0.11.0](https://github.com/boosterfuels/archetype/compare/v0.10.2...v0.11.0) (2020-02-27) |
{ | ||
"name": "archetype", | ||
"version": "0.11.0", | ||
"version": "0.11.1", | ||
"author": "Valeri Karpov <val@boosterfuels.com>", | ||
@@ -5,0 +5,0 @@ "dependencies": { |
@@ -79,3 +79,5 @@ 'use strict'; | ||
return []; | ||
} else if (!Array.isArray(obj) && Object.keys(obj).length === 0) { | ||
} else if (!Array.isArray(obj) && | ||
Object.keys(obj).length === 0 && | ||
[void 0, Object].indexOf(obj.constructor) !== -1) { | ||
return {}; | ||
@@ -82,0 +84,0 @@ } |
@@ -12,3 +12,6 @@ 'use strict'; | ||
Object.keys($default).length; | ||
if (numKeys > 0) { | ||
const isInvalidType = Array.isArray($default) ? | ||
false : | ||
[void 0, Object].indexOf($default.constructor) === -1; | ||
if (numKeys > 0 || isInvalidType) { | ||
throw new Error('Default is a non-empty object `' + | ||
@@ -15,0 +18,0 @@ util.inspect($default) + '`. Please make `$default` a function ' + |
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
44043
811