From 23691dc8610fb84841a7c207b9bf8fd0a8a20321 Mon Sep 17 00:00:00 2001 From: Alex Monk Date: Mon, 14 Sep 2015 21:13:45 +0100 Subject: [PATCH] If init fails once, don't completely break when the user retries The loading progress would not be reset upon failure, causing issues when you tried to start loading again. Bug: T96437 Change-Id: I7ec4be82304c101fa1bd634f60bc6b0047e2d53d --- .../ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js index 9df98fe483..01101e3222 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js +++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js @@ -181,6 +181,9 @@ target.on( 'deactivate', function () { active = false; } ); + target.on( 'loadError', function () { + resetLoadingProgress(); + } ); return target.activate( dataPromise ); } ) .then( function () {