Merge "Don't try to JSON stringify load error messages that are already strings"

This commit is contained in:
jenkins-bot 2017-01-03 20:22:50 +00:00 committed by Gerrit Code Review
commit 1ac5ede187

View file

@ -710,6 +710,8 @@ ve.init.mw.DesktopArticleTarget.prototype.loadFail = function ( error, errorText
}
} else if ( errorInfo ) {
confirmPromptMessage = ve.msg( 'visualeditor-loadwarning', errorText + ': ' + errorInfo );
} else if ( typeof error === 'string' ) {
confirmPromptMessage = error;
} else {
// At least give the devs something to work from
confirmPromptMessage = JSON.stringify( error );