mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-28 02:00:57 +00:00
Merge "Fix crash when opening VisualEditor NWE while DiscussionTools enabled"
This commit is contained in:
commit
8282cefb68
|
@ -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 ) );
|
||||
} );
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue