Merge pull request #1317 from lennym/master

Allow Backbone.ajax to reflect changes made to $.ajax or Backbone.setDomLibrary()
This commit is contained in:
Jeremy Ashkenas
2012-05-15 14:31:47 -07:00

View File

@@ -1370,7 +1370,9 @@
};
// Set the default ajax method if $ is defined.
if ($) Backbone.ajax = $.ajax;
if ($) Backbone.ajax = function () {
return $.ajax.apply(Backbone, arguments);
}
// Wrap an optional error callback with a fallback error event.
Backbone.wrapError = function(onError, originalModel, options) {