Permalink
Browse files

Merge pull request #23 from robholland/map_finds

Map finds as well as updates
  • Loading branch information...
2 parents 6108adc + c9c0efd commit 4b9724b7ba10aab4196e68562595a15773827479 @masylum committed Jul 13, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/helpers/mapper.js
View
@@ -81,9 +81,10 @@ MAPPER.filterUpdate = function (maps, arg) {
};
MAPPER.map = function (maps, fn, args) {
- if (fn === 'insert') {
+ if (fn === 'insert' || fn.match(/^find/)) {
MAPPER.filterUpdate(maps, args[0]);
} else if (fn === 'update') {
+ MAPPER.filterUpdate(maps, args[0]);
MAPPER.filterUpdate(maps, args[1]);
}
};

0 comments on commit 4b9724b

Please sign in to comment.