Skip to content

Commit

Permalink
fix: if element.getValue does not exist get value using component ele…
Browse files Browse the repository at this point in the history
…ments elements.getValue()
  • Loading branch information
frankpagan committed Nov 9, 2021
1 parent e83788f commit 91c1f2c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,10 @@ var CoCreateCalculation = {

let value = null;
if(input) {
value = Number(input.getValue(input));
if(input.getValue)
value = Number(input.getValue(input));
else
value = elements.getValue(input);
}
else {
value = this.calculationSpecialOperator(id);
Expand Down

0 comments on commit 91c1f2c

Please sign in to comment.