diff --git a/tools/migration/use-gridfs.js b/tools/migration/use-gridfs.js index 4401e83016..804f2aa27e 100644 --- a/tools/migration/use-gridfs.js +++ b/tools/migration/use-gridfs.js @@ -49,7 +49,7 @@ async function main() { const iterate = async () => { if (i == count) return true; - const doc = await db.get('drive_files').find({}, { limit: 1, skip: i }) + const doc = (await db.get('drive_files').find({}, { limit: 1, skip: i }))[0] const res = await migrateToGridFS(doc); if (!res) { return false;