@hostwebhook/template-engine 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -1
- package/dist/index.mjs +3 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -377,7 +377,9 @@ function resolveJsonValue(value, ctx, opts) {
|
|
|
377
377
|
return !val;
|
|
378
378
|
}
|
|
379
379
|
if (/\|\s*\w+/.test(expr)) {
|
|
380
|
-
|
|
380
|
+
const result = evaluate(expr, ctx, opts);
|
|
381
|
+
if (result !== "" && isFinite(Number(result))) return Number(result);
|
|
382
|
+
return result;
|
|
381
383
|
}
|
|
382
384
|
const resolved = resolvePath(expr, ctx);
|
|
383
385
|
if (resolved !== void 0) return resolved;
|
package/dist/index.mjs
CHANGED
|
@@ -335,7 +335,9 @@ function resolveJsonValue(value, ctx, opts) {
|
|
|
335
335
|
return !val;
|
|
336
336
|
}
|
|
337
337
|
if (/\|\s*\w+/.test(expr)) {
|
|
338
|
-
|
|
338
|
+
const result = evaluate(expr, ctx, opts);
|
|
339
|
+
if (result !== "" && isFinite(Number(result))) return Number(result);
|
|
340
|
+
return result;
|
|
339
341
|
}
|
|
340
342
|
const resolved = resolvePath(expr, ctx);
|
|
341
343
|
if (resolved !== void 0) return resolved;
|