From c18f6eafdc1a02739ccc595e672c36a3a385532e Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 2 Feb 2021 18:29:36 +0100 Subject: [PATCH] Fix usage bar race condition in offline mode --- www/common/common-ui-elements.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js index 78fc4ba68..7fdc3e957 100644 --- a/www/common/common-ui-elements.js +++ b/www/common/common-ui-elements.js @@ -1180,6 +1180,12 @@ define([ // so we can just use those and only check for errors var $container = $('', {'class':'cp-limit-container'}); var todo = function (err, data) { + if (err === 'RPC_NOT_READY') { + setTimeout(function () { + common.getPinUsage(teamId, todo); + }, 1000); + return; + } if (err || !data) { return void console.error(err || 'No data'); } var usage = data.usage;