Skip to main content

Bug Tracker

Side navigation

Ticket #3552: core.js.r6267.diff
File core.js.r6267.diff, 0.4 KB (added by Marc Diethelm, March 04, 2009 09:18AM UTC)

diff: fixes bug against r6267 (core.js)

--- /home/marc/www/lib/jQuery/diffs/core.js
+++ /home/marc/www/lib/jQuery/diffs/core.boo.js
@@ -252,7 +252,12 @@

 	wrapInner: function( html ) {
 		return this.each(function(){
-			jQuery( this ).contents().wrapAll( html );
+			var $this = jQuery( this );
+			if ( $this.contents().length ) {
+				$this.contents().wrapAll( html );
+			} else {
+				$this.html( html );
+			}
 		});
 	},

Download in other formats:

Original Format