Update CommonJS module registration to check to see if define is a function instead...
[jquery.git] / src / core.js
index 18cd3a3..4da1212 100644 (file)
@@ -733,6 +733,7 @@ jQuery.extend({
                        }
                }
 
+               // Flatten any nested arrays
                return ret.concat.apply( [], ret );
        },
 
@@ -885,6 +886,11 @@ function doScrollCheck() {
        jQuery.ready();
 }
 
+// Expose jQuery as an Asynchronous Module
+if ( typeof define === "function" ) {
+       define( "jquery", [], function () { return jQuery; } );
+}
+
 // Expose jQuery to the global object
 return (window.jQuery = window.$ = jQuery);