[Pkg-javascript-commits] [backbone] 43/74: don't send any data up, if you're not sending any data up ... fixes destroy.
Jonas Smedegaard
js at moszumanska.debian.org
Sat May 3 16:59:07 UTC 2014
This is an automated email from the git hooks/post-receive script.
js pushed a commit to tag 0.3.0
in repository backbone.
commit d651d82e92d335f64ba4ac95e259e26b5bce581b
Author: Jeremy Ashkenas <jashkenas at gmail.com>
Date: Tue Nov 2 13:48:10 2010 -0400
don't send any data up, if you're not sending any data up ... fixes destroy.
---
backbone.js | 2 +-
test/sync.js | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/backbone.js b/backbone.js
index 5dcca46..269bf8a 100644
--- a/backbone.js
+++ b/backbone.js
@@ -706,7 +706,7 @@
url: getUrl(model),
type: type,
contentType: 'application/json',
- data: sendModel ? modelJSON : {},
+ data: sendModel ? modelJSON : null,
dataType: 'json',
processData: false,
success: success,
diff --git a/test/sync.js b/test/sync.js
index 97c4d3f..8183c83 100644
--- a/test/sync.js
+++ b/test/sync.js
@@ -80,7 +80,7 @@ $(document).ready(function() {
library.first().destroy();
equals(lastRequest.url, '/library/2-the-tempest');
equals(lastRequest.type, 'DELETE');
- ok(_.isEmpty(lastRequest.data));
+ equals(lastRequest.data, null);
});
test("sync: destroy with emulateHttp", function() {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/backbone.git
More information about the Pkg-javascript-commits
mailing list