node-powertools
Advanced tools
Comparing version 1.4.1 to 1.4.2
@@ -505,7 +505,10 @@ (function (root, factory) { | ||
// Prepare wether we should execute the function | ||
const shouldExecute = !schemaDefault.types.includes('any') && !schemaDefault.types.includes('function'); | ||
// Run functions | ||
if (typeof schemaDefault.value === 'function') { | ||
if (typeof schemaDefault.value === 'function' && shouldExecute) { | ||
schemaDefault.value = schemaDefault.value(); | ||
} | ||
if (typeof schemaDefault.default === 'function') { | ||
if (typeof schemaDefault.default === 'function' && shouldExecute) { | ||
schemaDefault.default = schemaDefault.default(); | ||
@@ -512,0 +515,0 @@ } |
{ | ||
"name": "node-powertools", | ||
"version": "1.4.1", | ||
"version": "1.4.2", | ||
"description": "Powerful assistive functions for Node and Browser environments.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -505,7 +505,10 @@ (function (root, factory) { | ||
// Prepare wether we should execute the function | ||
const shouldExecute = !schemaDefault.types.includes('any') && !schemaDefault.types.includes('function'); | ||
// Run functions | ||
if (typeof schemaDefault.value === 'function') { | ||
if (typeof schemaDefault.value === 'function' && shouldExecute) { | ||
schemaDefault.value = schemaDefault.value(); | ||
} | ||
if (typeof schemaDefault.default === 'function') { | ||
if (typeof schemaDefault.default === 'function' && shouldExecute) { | ||
schemaDefault.default = schemaDefault.default(); | ||
@@ -512,0 +515,0 @@ } |
68682
1500