mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CategoryTree
synced 2024-11-15 03:43:55 +00:00
Clarify result handling in JavaScript
Change-Id: Id79340512854cb2e86a9275239bc9be79db26728
This commit is contained in:
parent
616e9e5dfe
commit
3232eedeb3
|
@ -163,6 +163,8 @@
|
|||
uselang: mw.config.get( 'wgUserLanguage' ),
|
||||
formatversion: 2
|
||||
} ).done( function ( data ) {
|
||||
var $data;
|
||||
|
||||
data = data.categorytree.html;
|
||||
|
||||
if ( data === '' ) {
|
||||
|
@ -184,12 +186,13 @@
|
|||
data = mw.msg( 'categorytree-nothing-found' );
|
||||
}
|
||||
|
||||
data = $( '<i class="CategoryTreeNotice"></i>' ).text( data );
|
||||
$data = $( '<i class="CategoryTreeNotice"></i>' ).text( data );
|
||||
} else {
|
||||
$data = $( $.parseHTML( data ) );
|
||||
attachHandler( $data );
|
||||
}
|
||||
|
||||
$children.html( data );
|
||||
attachHandler( $children );
|
||||
|
||||
$children.empty().append( $data );
|
||||
} )
|
||||
.fail( error );
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue