Browse Source

fix: typo correction

pull/7268/head
Pranav C 11 months ago
parent
commit
977b2eed78
  1. 7
      packages/nocodb-sdk/src/lib/formulaHelpers.ts

7
packages/nocodb-sdk/src/lib/formulaHelpers.ts

@ -1508,11 +1508,11 @@ export function validateFormulaAndExtractTreeWithType({
if (['==', '<', '>', '<=', '>=', '!='].includes(parsedTree.operator)) { if (['==', '<', '>', '<=', '>=', '!='].includes(parsedTree.operator)) {
res.dataType = FormulaDataTypes.COND_EXP; res.dataType = FormulaDataTypes.COND_EXP;
} } else if (parsedTree.operator === '+') {
else if (parsedTree.operator === '+') {
res.dataType = FormulaDataTypes.NUMERIC; res.dataType = FormulaDataTypes.NUMERIC;
// if any side is string/date/other type, then the result will be concatenated string // if any side is string/date/other type, then the result will be concatenated string
// e.g. 1 + '2' = '12' // e.g. 1 + '2' = '12'
if (
[res.left, res.right].some( [res.left, res.right].some(
(r) => (r) =>
![ ![
@ -1525,9 +1525,8 @@ export function validateFormulaAndExtractTreeWithType({
) { ) {
res.dataType = FormulaDataTypes.STRING; res.dataType = FormulaDataTypes.STRING;
} }
} else {
res.dataType = FormulaDataTypes.NUMERIC;
} }
res.dataType = FormulaDataTypes.NUMERIC;
} }
return res; return res;

Loading…
Cancel
Save