- fixed issue with new table skips decimals;
This commit is contained in:
@@ -38,6 +38,7 @@ import getTokens from '../../helpers/getTokens';
|
||||
import renderWithDataVars from '../../helpers/renderWithDataVars';
|
||||
import { evaluate } from 'mathjs';
|
||||
import equal from 'fast-deep-equal';
|
||||
import parseCommaDecimal from '../../helpers/parseCommaDecimal';
|
||||
|
||||
const BandoApplicationPreview = () => {
|
||||
const { id } = useParams();
|
||||
@@ -272,7 +273,7 @@ const BandoApplicationPreview = () => {
|
||||
context = getTokens(formula.value)
|
||||
.filter(v => !['false', 'null', 'true'].includes(v))
|
||||
.reduce((acc, cur) => {
|
||||
acc[cur] = isNil(context[cur]) ? 0 : parseFloat(context[cur]);
|
||||
acc[cur] = isNil(context[cur]) ? 0 : parseCommaDecimal(context[cur]);
|
||||
return acc;
|
||||
}, context);
|
||||
const mathFormula = renderWithDataVars(formula.value, context);
|
||||
|
||||
Reference in New Issue
Block a user