Skip to content

Commit

Permalink
Remove _id property when updating collection
Browse files Browse the repository at this point in the history
  • Loading branch information
loneleeandroo committed Mar 7, 2014
1 parent 60acbdc commit dd45aa8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion modules/ngMeteor-collections.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ ngMeteorCollections.factory('$collection', ['$window', '$rootScope', 'HashKeyCop
if(!item._id){
collection.insert(item);
}else{
collection.update(item._id, {$set: item});
var item_id = item._id;
delete item._id;
collection.update(item_id, {$set: item});
}
}
if(!data){
Expand Down
2 changes: 1 addition & 1 deletion smart.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"homepage": "https://github.com/loneleeandroo/ngMeteor",
"author": "Androo Lee",
"git": "https://github.com/loneleeandroo/ngMeteor.git",
"version": "0.1.13",
"version": "0.1.14",
"packages": {}
}

0 comments on commit dd45aa8

Please sign in to comment.