From dd2cb8215c6e69cb9c94b1f59deb57761d6e0af3 Mon Sep 17 00:00:00 2001 From: Gabriel Henriques Date: Wed, 7 Jul 2021 18:13:18 -0300 Subject: [PATCH] Fix collection update --- app/authorization/client/startup.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/authorization/client/startup.js b/app/authorization/client/startup.js index a9cf0250f45c..202f0089d3d1 100644 --- a/app/authorization/client/startup.js +++ b/app/authorization/client/startup.js @@ -13,7 +13,7 @@ Meteor.startup(() => { CachedCollectionManager.onLogin(async () => { const { roles } = await APIClient.v1.get('roles.list'); // if a role is checked before this collection is populated, it will return undefined - Roles._collection._docs._map = Object.fromEntries(roles.map((record) => [record._id, record])); + Roles._collection._docs._map = new Map(roles.map((record) => [record._id, record])); Object.values(Roles._collection.queries).forEach((query) => Roles._collection._recomputeResults(query)); Roles.ready.set(true);