From 0bc3c81978e1c7b333f28c18cee898a6957c87c2 Mon Sep 17 00:00:00 2001 From: Ed Sanders Date: Mon, 6 May 2019 15:09:45 -0500 Subject: [PATCH] Fix setting of this.loading so it can be cleared Set this.loading to dataPromise before the done handler is attached as that can run synchronously and try to set this.loading back to false. Change-Id: I4e5208b7bac9968951f30555dc56e054c38a3935 --- modules/ve-mw/init/ve.init.mw.ArticleTarget.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js index 8556d0bb00..fa33c50c38 100644 --- a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js +++ b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js @@ -1158,7 +1158,8 @@ ve.init.mw.ArticleTarget.prototype.load = function ( dataPromise ) { targetName: this.constructor.static.trackingName } ); - this.loading = dataPromise + this.loading = dataPromise; + dataPromise .done( this.loadSuccess.bind( this ) ) .fail( this.loadFail.bind( this ) );