Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

save method explicitly checks for false

indexer can return 0 (The first result) and therefore when comparing it
should explicitly check for false as an index of 0 would be falsey.
  • Loading branch information...
commit af5eb188f537b144ea67789d3577959e73d2df92 1 parent 712944b
@peterp peterp authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/adapters/dom.js
2  src/adapters/dom.js
@@ -61,7 +61,7 @@ Lawnchair.adapter('dom', {
save: function (obj, callback) {
var key = obj.key || this.uuid()
// if the key is not in the index push it on
- if (!this.indexer.find(key)) this.indexer.add(key)
+ if (this.indexer.find(key) === false) this.indexer.add(key)
// now we kil the key and use it in the store colleciton
delete obj.key;, JSON.stringify(obj))

0 comments on commit af5eb18

Please sign in to comment.
Something went wrong with that request. Please try again.