@leankylin-sheet/excel 5.2.55 → 5.2.57
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.esm.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -5086,7 +5086,7 @@ var getVariable = function getVariable(variables, sheetId, name) {
|
|
|
5086
5086
|
var replaceVariablesInFormula = function replaceVariablesInFormula(formula, variables, sheetId) {
|
|
5087
5087
|
if (_.isNil(variables)) return formula;
|
|
5088
5088
|
return formula.replace(/\{\{(.*?)\}\}/g, function (match) {
|
|
5089
|
-
var value = getVariable(variables, sheetId, match);
|
|
5089
|
+
var value = getVariable(variables, sheetId, match) || 0;
|
|
5090
5090
|
if (_.isNil(value)) return match;
|
|
5091
5091
|
if (typeof value === "string") return "\"".concat(value.replace(/"/g, '""'), "\"");
|
|
5092
5092
|
if (typeof value === "boolean") return value ? "TRUE" : "FALSE";
|
package/dist/index.js
CHANGED
|
@@ -5098,7 +5098,7 @@ var getVariable = function getVariable(variables, sheetId, name) {
|
|
|
5098
5098
|
var replaceVariablesInFormula = function replaceVariablesInFormula(formula, variables, sheetId) {
|
|
5099
5099
|
if (___default['default'].isNil(variables)) return formula;
|
|
5100
5100
|
return formula.replace(/\{\{(.*?)\}\}/g, function (match) {
|
|
5101
|
-
var value = getVariable(variables, sheetId, match);
|
|
5101
|
+
var value = getVariable(variables, sheetId, match) || 0;
|
|
5102
5102
|
if (___default['default'].isNil(value)) return match;
|
|
5103
5103
|
if (typeof value === "string") return "\"".concat(value.replace(/"/g, '""'), "\"");
|
|
5104
5104
|
if (typeof value === "boolean") return value ? "TRUE" : "FALSE";
|