From 79daaea1a8cd204107379ca3114dae004b08f204 Mon Sep 17 00:00:00 2001 From: Kaldari Date: Thu, 8 Nov 2012 18:19:04 -0800 Subject: [PATCH] Oops, restoring the line I accidently deleted. Change-Id: Iefef1881648190c96ac8f6e0b57642018beb3643 --- resources/jquery/jquery.badge.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/resources/jquery/jquery.badge.js b/resources/jquery/jquery.badge.js index 3a2a337b81..982974761d 100644 --- a/resources/jquery/jquery.badge.js +++ b/resources/jquery/jquery.badge.js @@ -39,11 +39,13 @@ // If a badge already exists, reuse it if ( $badge.length ) { $badge.find( '.mw-badge-content' ).text( text ); + } else { + // Otherwise, create a new badge with the specified text and style + div = document.createElement( 'div' ); + div.className = 'mw-badge mw-badge-' + ( inline ? 'inline' : 'overlay' ); + div.innerHTML = '' + text + ''; + $( div ).appendTo( this ); } - // Otherwise, create a new badge with the specified text and style - div = document.createElement( 'div' ); - div.className = 'mw-badge mw-badge-' + ( inline ? 'inline' : 'overlay' ); - div.innerHTML = '' + text + ''; } else { $badge.remove(); } -- 2.20.1