From 0d9939c894cce3b1bf2e0a2b046d2bcec0f6d185 Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 24 Mar 2022 12:45:03 +0530 Subject: [PATCH] minor teams proxy optimization --- www/common/outer/team.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/www/common/outer/team.js b/www/common/outer/team.js index 32ce35f3b..2bd43e1ea 100644 --- a/www/common/outer/team.js +++ b/www/common/outer/team.js @@ -1878,7 +1878,9 @@ define([ progress: 0 }; - var teams = store.proxy.teams = store.proxy.teams || {}; + if (!store.proxy.teams) { store.proxy.teams = {}; } + var teams = store.proxy.teams; + ctx.numberOfTeams = Object.keys(teams).length; // Listen for changes in our access rights (if another worker receives edit access)