lemonadejs
Advanced tools
Comparing version 4.0.0-beta.5 to 4.0.0-beta.6
@@ -64,3 +64,3 @@ /** | ||
// Check if the property exists | ||
if (o.hasOwnProperty(p)) { | ||
if (o.hasOwnProperty(p) || typeof(o[p]) !== 'undefined') { | ||
o = o[p]; | ||
@@ -388,16 +388,29 @@ } else { | ||
} else { | ||
v = o.v.replace(isScript, function(a,b) { | ||
let r = extractFromPath.call(o.s, b); | ||
if (typeof(r) === 'function') { | ||
return r.call(o.s, o.e, a); | ||
let index = 0; | ||
let result; | ||
// Replace string | ||
v = o.v.replace(isScript, function(a, b) { | ||
// How many replacements | ||
index++; | ||
// Try to find the property | ||
result = extractFromPath.call(o.s, b); | ||
// If that is a function execute and get the return | ||
if (typeof(result) === 'function') { | ||
result = result.call(o.s, o.e, a); | ||
} else { | ||
if (typeof(r) === 'undefined') { | ||
r = run.call(o.s, b); | ||
if (typeof(r) === 'undefined') { | ||
r = ''; | ||
if (typeof(result) === 'undefined') { | ||
result = run.call(o.s, b); | ||
if (typeof(result) === 'undefined') { | ||
result = ''; | ||
} | ||
} | ||
return r; | ||
} | ||
// Return | ||
return result; | ||
}); | ||
// Parse correct type | ||
if (typeof(result) !== 'string' && index === 1) { | ||
v = result; | ||
} | ||
} | ||
@@ -404,0 +417,0 @@ |
@@ -69,3 +69,3 @@ /** | ||
// Check if the property exists | ||
if (o.hasOwnProperty(p)) { | ||
if (o.hasOwnProperty(p) || typeof(o[p]) !== 'undefined') { | ||
o = o[p]; | ||
@@ -393,16 +393,29 @@ } else { | ||
} else { | ||
v = o.v.replace(isScript, function(a,b) { | ||
let r = extractFromPath.call(o.s, b); | ||
if (typeof(r) === 'function') { | ||
return r.call(o.s, o.e, a); | ||
let index = 0; | ||
let result; | ||
// Replace string | ||
v = o.v.replace(isScript, function(a, b) { | ||
// How many replacements | ||
index++; | ||
// Try to find the property | ||
result = extractFromPath.call(o.s, b); | ||
// If that is a function execute and get the return | ||
if (typeof(result) === 'function') { | ||
result = result.call(o.s, o.e, a); | ||
} else { | ||
if (typeof(r) === 'undefined') { | ||
r = run.call(o.s, b); | ||
if (typeof(r) === 'undefined') { | ||
r = ''; | ||
if (typeof(result) === 'undefined') { | ||
result = run.call(o.s, b); | ||
if (typeof(result) === 'undefined') { | ||
result = ''; | ||
} | ||
} | ||
return r; | ||
} | ||
// Return | ||
return result; | ||
}); | ||
// Parse correct type | ||
if (typeof(result) !== 'string' && index === 1) { | ||
v = result; | ||
} | ||
} | ||
@@ -409,0 +422,0 @@ |
@@ -42,3 +42,3 @@ { | ||
"types": "dist/lemonade.d.ts", | ||
"version": "4.0.0-beta.5" | ||
"version": "4.0.0-beta.6" | ||
} |
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
93359
2209