Skip to content

Commit 3bb412f

Browse files
committed
fix: await getValue()
1 parent f13d691 commit 3bb412f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/client.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ const CoCreateApi = {
9797
}
9898
},
9999

100-
__request: function ({ name, endPoint, element }) {
100+
__request: async function ({ name, endPoint, element }) {
101101
let form = element.closest('form');
102-
let data = this.getData({ name, endPoint, form });
102+
let data = await this.getData({ name, endPoint, form });
103103
this.send(name, endPoint, data[endPoint]);
104104
},
105105

@@ -140,7 +140,7 @@ const CoCreateApi = {
140140
},
141141

142142

143-
getData: function ({ name, endPoint, element, form }) {
143+
getData: async function ({ name, endPoint, element, form }) {
144144
const data = {}
145145
const selector = `[${name}^="${endPoint}."]`
146146
let elements
@@ -152,7 +152,7 @@ const CoCreateApi = {
152152
if (!el || el.closest('[template]')) continue
153153
let attribute = el.getAttribute(name)
154154
if (attribute)
155-
data[attribute] = el.getValue()
155+
data[attribute] = await el.getValue()
156156
}
157157

158158
return dotNotationToObject(data);

0 commit comments

Comments
 (0)