mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-29 08:34:54 +00:00
AceEditorWidget: Use mw.loader#getState instead of private moduleRegistry
Change-Id: I845651af837ccc042b6193876e17ba2b571dfe9c
This commit is contained in:
parent
565a10da61
commit
35b9c4119a
|
@ -55,7 +55,7 @@ OO.inheritClass( ve.ui.MWAceEditorWidget, ve.ui.WhitespacePreservingTextInputWid
|
||||||
*/
|
*/
|
||||||
ve.ui.MWAceEditorWidget.prototype.setup = function () {
|
ve.ui.MWAceEditorWidget.prototype.setup = function () {
|
||||||
if ( !this.loadingPromise ) {
|
if ( !this.loadingPromise ) {
|
||||||
this.loadingPromise = mw.loader.moduleRegistry.hasOwnProperty( 'ext.codeEditor.ace.modes' ) ?
|
this.loadingPromise = mw.loader.getState( 'ext.codeEditor.ace.modes' ) ?
|
||||||
mw.loader.using( 'ext.codeEditor.ace.modes' ).then( this.setupEditor.bind( this ) ) :
|
mw.loader.using( 'ext.codeEditor.ace.modes' ).then( this.setupEditor.bind( this ) ) :
|
||||||
$.Deferred().reject().promise();
|
$.Deferred().reject().promise();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue