fix async

This commit is contained in:
casperlamboo 2017-11-02 17:21:34 +01:00
parent 8d098829ad
commit cffceb9d96

View File

@ -37,7 +37,7 @@ export default async function docToFile(db, doc, { image = false, sketch = false
return response;
}
function addAttachments(db, docs, keys) {
async function addAttachments(db, docs, keys) {
if (keys) {
keys = keys.reduce((obj, value) => {
obj[value] = null;
@ -59,5 +59,5 @@ function addAttachments(db, docs, keys) {
}
}
await Promise.all(promises);
return await Promise.all(promises);
}