mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-25 11:16:51 +00:00
MWNoticesPopupTool: When setting notices, clear existing notices
This would keep on duplicating notices when switching modes. Change-Id: I04720904eddd95c0d3618d284d1930e41a0ae137
This commit is contained in:
parent
cf94956fba
commit
318c6718fd
|
@ -78,6 +78,10 @@ ve.ui.MWNoticesPopupTool.prototype.setNotices = function ( notices ) {
|
||||||
mw.language.convertNumber( count )
|
mw.language.convertNumber( count )
|
||||||
) );
|
) );
|
||||||
|
|
||||||
|
if ( this.$items ) {
|
||||||
|
this.$items.remove();
|
||||||
|
}
|
||||||
|
|
||||||
this.$items = $( '<div>' ).addClass( 've-ui-mwNoticesPopupTool-items' );
|
this.$items = $( '<div>' ).addClass( 've-ui-mwNoticesPopupTool-items' );
|
||||||
|
|
||||||
notices.forEach( function ( itemHtml ) {
|
notices.forEach( function ( itemHtml ) {
|
||||||
|
|
Loading…
Reference in a new issue