don't check account usage if you aren't logged in

This commit is contained in:
ansuz 2017-09-08 14:00:49 +02:00
parent bbf7ed3827
commit 739903d511

View file

@ -1099,6 +1099,7 @@ define([
*/ */
var LIMIT_REFRESH_RATE = 30000; // milliseconds var LIMIT_REFRESH_RATE = 30000; // milliseconds
common.createUsageBar = function (cb) { common.createUsageBar = function (cb) {
if (!isLoggedIn()) { return cb("NOT_LOGGED_IN"); }
// getPinnedUsage updates common.account.usage, and other values // getPinnedUsage updates common.account.usage, and other values
// so we can just use those and only check for errors // so we can just use those and only check for errors
var $container = $('<span>', {'class':'limit-container'}); var $container = $('<span>', {'class':'limit-container'});