mongodb - mongo - $inc incrementing by 2 instead of 1 using meteor methods -


meteor method:-

incrementcount: function(toperson){  meteor.users.update({'emails.0.address': toperson}, {$inc: {'profile.notificationcount': 1}});  } 

meteor method call:-

meteor.call("incrementcount", message.to); 

the issue on first load notificationcount increments 2, loads afterwards increment accurately 1.

i have searched docs mongodb solutions did not have success.

thank in advance responses.


Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -