From 689d63f4871d96300d492fa5ab9d25301070efba Mon Sep 17 00:00:00 2001 From: Jephte CLAIN Date: Tue, 19 Oct 2010 09:29:20 +0400 Subject: [PATCH] Return control of $ and jQuery only if it is really necessary. This make jQuery.noConflict() callable anytime. --- src/core.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core.js b/src/core.js index 99521d91c..f701a20c1 100644 --- a/src/core.js +++ b/src/core.js @@ -373,9 +373,9 @@ jQuery.extend = jQuery.fn.extend = function() { jQuery.extend({ noConflict: function( deep ) { - window.$ = _$; + if ( window.$ === jQuery ) window.$ = _$; - if ( deep ) { + if ( deep && window.jQuery === jQuery ) { window.jQuery = _jQuery; }