File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -1262,9 +1262,16 @@ SwaggerHttp.prototype.isIE8 = function() {
12621262} ;
12631263
12641264/*
1265- * JQueryHttpClient lets a browser take advantage of JQuery's cross-browser magic
1265+ * JQueryHttpClient lets a browser take advantage of JQuery's cross-browser magic.
1266+ * NOTE: when jQuery is available it will export both '$' and 'jQuery' to the global space.
1267+ * Since we are using closures here we need to alias it for internal use.
12661268 */
1267- var JQueryHttpClient = function ( options ) { }
1269+ var JQueryHttpClient = function ( options ) {
1270+ "use strict" ;
1271+ if ( ! jQuery ) {
1272+ var jQuery = window . jQuery ;
1273+ }
1274+ }
12681275
12691276JQueryHttpClient . prototype . execute = function ( obj ) {
12701277 var cb = obj . on ;
@@ -1337,9 +1344,9 @@ JQueryHttpClient.prototype.execute = function(obj) {
13371344 else
13381345 return cb . response ( out ) ;
13391346 } ;
1340-
1341- $ . support . cors = true ;
1342- return $ . ajax ( obj ) ;
1347+
1348+ jQuery . support . cors = true ;
1349+ return jQuery . ajax ( obj ) ;
13431350}
13441351
13451352/*
You can’t perform that action at this time.
0 commit comments