Skip to content

Commit 93a475a

Browse files
committed
fix: await getValue()
1 parent 04c9f8f commit 93a475a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/client.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ async function getFiles(fileInputs) {
203203
if (!file.src)
204204
file = await readFile(file)
205205

206-
file = getCustomData({ ...file })
206+
file = await getCustomData({ ...file })
207207
files.push(file)
208208
}
209209
}
@@ -213,14 +213,14 @@ async function getFiles(fileInputs) {
213213
}
214214

215215
// gets file custom data
216-
function getCustomData(file) {
216+
async function getCustomData(file) {
217217
let form = document.querySelector(`[file_id="${file.id}"]`);
218218
if (form) {
219219
let elements = form.querySelectorAll('[file]');
220220
for (let i = 0; i < elements.length; i++) {
221221
let name = elements[i].getAttribute('file')
222222
if (name) {
223-
file[name] = elements[i].getValue()
223+
file[name] = await elements[i].getValue()
224224
}
225225
}
226226
}

0 commit comments

Comments
 (0)