diff options
-rw-r--r-- | server/migrations.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/server/migrations.js b/server/migrations.js index ea13f6b4..684a8bbe 100644 --- a/server/migrations.js +++ b/server/migrations.js @@ -140,7 +140,7 @@ Migrations.add('add-sort-checklists', () => { noValidate ); } - checklist.items.forEach(function(item, index) { + checklist.items.find().forEach((item, index) => { if (!item.hasOwnProperty('sort')) { Checklists.direct.update( { _id: checklist._id, 'items._id': item._id }, |