Skip to content

Commit

Permalink
remove comments
Browse files Browse the repository at this point in the history
  • Loading branch information
scottmessinger committed May 5, 2014
1 parent 00c0b86 commit 7ec2bdb
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/knapsack.js
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,6 @@ KS.Collection.prototype._findByIndex = function(index, value, cb){


KS.Collection.prototype._remove = function(id, cb){
console.log('remove a document with id', id)
var self = this;
return new Promise(function(resolve, reject){
// remove from localforage
Expand Down Expand Up @@ -444,15 +443,13 @@ KS.Collection.prototype._update = function(newDoc, cb){
.then(function(value){
oldDoc = value
if (value == null){
console.log('doc wasnt found', newDoc)
if (cb){ cb(null, new Error("Document has already been deleted")) }
reject(new Error("Document has already been deleted"))
}
return localforage.setItem(self.docBaseName + newDoc.id, newDoc)
})
.then(function(newDoc){
indexNamesToUpdate = _.compact(_.map(self.indexNames, function(indexName){
console.log('oldDoc', oldDoc, index)
if (oldDoc[indexName] !== newDoc[indexName]){
return indexName
}
Expand Down

0 comments on commit 7ec2bdb

Please sign in to comment.