amis-formula 1.2.2 → 1.2.3
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 +4 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-formula v1.2.
|
|
2
|
+
* amis-formula v1.2.3
|
|
3
3
|
* Copyright 2021 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -2466,7 +2466,9 @@ var resolveVariableAndFilter = function (path, data, defaultFilter, fallbackValu
|
|
|
2466
2466
|
var ret = new Evaluator(data, {
|
|
2467
2467
|
defaultFilter: defaultFilter
|
|
2468
2468
|
}).evalute(ast);
|
|
2469
|
-
return ret == null
|
|
2469
|
+
return ret == null && !~path.indexOf('default') && !~path.indexOf('now')
|
|
2470
|
+
? fallbackValue(ret)
|
|
2471
|
+
: ret;
|
|
2470
2472
|
};
|
|
2471
2473
|
|
|
2472
2474
|
var _this = undefined;
|