mirror of
https://github.com/Doodle3D/Doodle3D-Core.git
synced 2024-12-31 23:33:47 +01:00
fix async
This commit is contained in:
parent
8d098829ad
commit
cffceb9d96
@ -37,7 +37,7 @@ export default async function docToFile(db, doc, { image = false, sketch = false
|
|||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
function addAttachments(db, docs, keys) {
|
async function addAttachments(db, docs, keys) {
|
||||||
if (keys) {
|
if (keys) {
|
||||||
keys = keys.reduce((obj, value) => {
|
keys = keys.reduce((obj, value) => {
|
||||||
obj[value] = null;
|
obj[value] = null;
|
||||||
@ -59,5 +59,5 @@ function addAttachments(db, docs, keys) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
await Promise.all(promises);
|
return await Promise.all(promises);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user