Skip to content

Commit

Permalink
avoid to enter in conflict with jsonp mechanism
Browse files Browse the repository at this point in the history
  • Loading branch information
mcallew committed Jun 30, 2015
1 parent 2e8bdf5 commit ff56458
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Backbone.CrossDomain.js
Expand Up @@ -65,6 +65,11 @@
// the original 'Backbone.sync' is still available in 'Backbone.vanillaSync'
Backbone.sync = function(method, model, options) {

// avoid to enter in conflict with jsonp mechanism
if (options.dataType === 'jsonp') {
return Backbone.vanillaSync.apply(this, arguments);
}

// See if we need to use the XDomainRequest object for IE. If the request is on the
// same domain, we can fall back on the normal Backbone.ajax handling.
var useXDomainRequest = false;
Expand Down

0 comments on commit ff56458

Please sign in to comment.