Alex Monk has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/327721 )

Change subject: Fix check for HTTP error
......................................................................

Fix check for HTTP error

For some reason these parameters are backwards in this particular case?

Not sure about the other case here ('error').

Bug: T152429
Change-Id: I435ac148007db87da69e8cf48568fafa646abb71
---
M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/21/327721/1

diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js 
b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
index 8bb7d28..1b08706 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
@@ -686,11 +686,11 @@
        }
 
        if ( !error || error.statusText !== 'abort' ) {
-               if ( errorText === 'http' || errorText === 'error' ) {
-                       if ( error && ( error.status || ( error.xhr && 
error.xhr.status ) ) ) {
+               if ( error === 'http' || errorText === 'error' ) {
+                       if ( errorText && ( errorText.status || ( errorText.xhr 
&& errorText.xhr.status ) ) ) {
                                confirmPromptMessage = ve.msg(
                                        'visualeditor-loadwarning',
-                                       'HTTP ' + ( error.status || 
error.xhr.status )
+                                       'HTTP ' + ( errorText.status || 
errorText.xhr.status )
                                );
                        } else {
                                confirmPromptMessage = ve.msg(

-- 
To view, visit https://gerrit.wikimedia.org/r/327721
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I435ac148007db87da69e8cf48568fafa646abb71
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Alex Monk <a...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to