vue-meteor-tracker
vue-meteor-tracker copied to clipboard
findOne(_id) cursors do not work with meteor collection hooks
trafficstars
I use a few before.find and before.findOne hooks from https://github.com/matb33/meteor-collection-hooks. And they only work outside of the vue meteor tracker. E.g.
If I have hook:
Projects.before.findOne(function (userId, selector, options) {
selector.removed = null
});
This will work:
methods: {
findProject () {
return Projects.findOne('xyz')
}
}
This will work:
meteor: {
project () {
return Projects.findOne({_id: 'xyz'});
}
}
This will not work:
meteor: {
project () {
return Projects.findOne('xyz');
}
}