From cffceb9d96f5cad11b8ac91e81934ed80bcdeaf7 Mon Sep 17 00:00:00 2001 From: casperlamboo Date: Thu, 2 Nov 2017 17:21:34 +0100 Subject: [PATCH] fix async --- src/shape/dbToDoc.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shape/dbToDoc.js b/src/shape/dbToDoc.js index 9ff5bc3..e1c29f6 100644 --- a/src/shape/dbToDoc.js +++ b/src/shape/dbToDoc.js @@ -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); }