Merge "Fix crash when opening VisualEditor NWE while DiscussionTools enabled"

This commit is contained in:
jenkins-bot 2020-01-08 23:28:18 +00:00 committed by Gerrit Code Review
commit 8282cefb68

View file

@ -12,7 +12,9 @@ if ( new mw.Uri().query.dtdebug ) {
mw.hook( 'wikipage.content' ).add( function ( $container ) {
// Don't re-run if we already handled this element
if ( $container.closest( '.dt-init-done' ).length === 0 ) {
controller.init( $container.find( '#mw-content-text' ).addBack( '#mw-content-text' ) );
$container.find( '#mw-content-text' ).addBack( '#mw-content-text' ).each( function () {
controller.init( $( this ) );
} );
}
} );
}