(js) Fix mailboxes refresh

Fixes #4787
pull/259/head
Francis Lachapelle 2019-09-20 16:37:51 -04:00
parent 3cddb54e4e
commit 2eec7658f3
1 changed files with 3 additions and 3 deletions

View File

@ -133,12 +133,12 @@
* @returns a promise of the HTTP operation
*/
Account.prototype.$getMailboxes = function(options) {
var _this = this;
var _this = this, reload = (options && options.reload);
if (this.$mailboxes && !(options && options.reload)) {
if (this.$mailboxes && !reload) {
return Account.$q.when(this.$mailboxes);
}
else if (this.$futureMailboxesData) {
else if (!reload && this.$futureMailboxesData) {
return this.$futureMailboxesData;
}
else {