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
This commit is contained in:
Ed Sanders 2019-05-06 15:09:45 -05:00
parent dd262c5089
commit 0bc3c81978

View file

@ -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 ) );