Log realtime preview errors to console

Bug: T303545
Change-Id: Iaa23b85eeb8d9951cbbbf350e55da006d49c84fa
This commit is contained in:
Sam Wilson 2022-03-21 14:25:31 +08:00 committed by MusikAnimal
parent 07423d1a9f
commit cdd01171cc

View file

@ -153,6 +153,7 @@ RealtimePreview.prototype.doRealtimePreview = function () {
loadingSelectors: loadingSelectors loadingSelectors: loadingSelectors
} ).fail( function ( code, result ) { } ).fail( function ( code, result ) {
this.showError( ( new mw.Api() ).getErrorMessage( result ) ); this.showError( ( new mw.Api() ).getErrorMessage( result ) );
mw.log.error( 'WikiEditor realtime preview error', result );
}.bind( this ) ).always( function () { }.bind( this ) ).always( function () {
this.twoPaneLayout.getPane2().removeClass( 'ext-WikiEditor-twopanes-loading' ); this.twoPaneLayout.getPane2().removeClass( 'ext-WikiEditor-twopanes-loading' );
this.isPreviewing = false; this.isPreviewing = false;