Permalink
Browse files

Match comparator string checks in `sort` and `add`

  • Loading branch information...
1 parent 2abe285 commit 6868457ff5cda6a5324b5607686915638a371e8e @caseywebdev caseywebdev committed Dec 21, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 backbone.js
View
@@ -593,7 +593,7 @@
add = [];
at = options.at;
sort = this.comparator && (at == null) && (options.sort == null || options.sort);
- sortAttr = typeof this.comparator === 'string' ? this.comparator : null;
+ sortAttr = _.isString(this.comparator) ? this.comparator : null;
// Turn bare objects into model references, and prevent invalid models
// from being added.

0 comments on commit 6868457

Please sign in to comment.