Permalink
Browse files

use == instead of triple to compare with null

  • Loading branch information...
1 parent bd0332c commit 1b0b31f459a51dd07b64e774a48926cece2de416 @caleb committed Jun 15, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 backbone-rails.js
View
@@ -6,7 +6,7 @@
Backbone.sync = _.wrap(Backbone.sync, function(_sync, method, model, options) {
// Serialize data, optionally using paramRoot
- if (options.data === null && model && (method === 'create' || method === 'update' || method === 'patch')) {
+ if (options.data == null && model && (method === 'create' || method === 'update' || method === 'patch')) {
options.contentType = 'application/json';
var json, data = options.attrs || model.toJSON(options);

0 comments on commit 1b0b31f

Please sign in to comment.