Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #1285 from braddunbar/ajax

Avoid throwing when $ is not defined.
  • Loading branch information...
commit 36dfdab567ea6799e8c7ff34a2e34ad81cee4340 2 parents 22606f9 + 4dcf4bd
@jashkenas jashkenas authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 backbone.js
View
4 backbone.js
@@ -1370,8 +1370,8 @@
return Backbone.ajax(_.extend(params, options));
};
- // Set the default ajax method.
- Backbone.ajax = $.ajax;
+ // Set the default ajax method if $ is defined.
+ if ($) Backbone.ajax = $.ajax;
// Wrap an optional error callback with a fallback error event.
Backbone.wrapError = function(onError, originalModel, options) {
Please sign in to comment.
Something went wrong with that request. Please try again.