I am using meteor with vue and using meteor-vue-tracker for reactive data. When i returning a collection from the tracker the data comes first two time as empty array and third time with the data. But in some of my vue component the tracker only run for two time since i am getting data only on third time the data returns as empty array in the particular component. Why this happens any idea? How many times meteor tracker run by default and how can we force tracker to run ?
meteor: {
$subscribe: {
'notes': []
},
async dataTrack() {
if(Meteor.status().connected){
this.data = Notes.find().fetch();
}else{
if(this.$pouch){
this.data = await this.$pouch.find({
selector: {
_id: {$gte: null}
},
},'notes').then(function(result){
return result.docs;
});
}
}
}
}