Skip to content

Commit 72009b6

Browse files
committed
fix: await getValue()
1 parent cfcf3bd commit 72009b6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ var CoCreateCalculation = {
8282
return selectors;
8383
},
8484

85-
getValues: function (calculation) {
85+
getValues: async function (calculation) {
8686
let selectors = this.getSelectors(calculation);
8787

8888
for (let i = 0; i < selectors.length; i++) {
@@ -94,7 +94,7 @@ var CoCreateCalculation = {
9494
for (let input of inputs) {
9595
let val = null;
9696
if (input.getValue)
97-
val = Number(input.getValue());
97+
val = Number(await input.getValue());
9898

9999
if (!Number.isNaN(value)) {
100100
value += val;
@@ -109,11 +109,11 @@ var CoCreateCalculation = {
109109
return calculation;
110110
},
111111

112-
setCalcationResult: function (element) {
112+
setCalcationResult: async function (element) {
113113
const { object, isRealtime } = getAttributes(element);
114114
let calculation = element.getAttribute('calculate');
115115

116-
let calString = this.getValues(calculation);
116+
let calString = await this.getValues(calculation);
117117

118118
if (calString) {
119119
let result = calculate(calString);

0 commit comments

Comments
 (0)