Skip to content
Browse files

Merge pull request #5 from shimondoodkin/master

small fix believe event!=='say:' to event!=='set:say:'
  • Loading branch information...
2 parents 085a1f8 + d53fbdf commit 07c6493bbfe59e1305e171a9d934ada8b8020e0d @shimondoodkin shimondoodkin committed Jun 24, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/telepathine.js
View
2 lib/telepathine.js
@@ -324,7 +324,7 @@ Telepathine.prototype.believe = function (key, callback) {
var that = this;
this.on('set:' + key, function(peer, key, value, ttl) {
if (peer!=that.peer_name) {
- if(this.event.substring(0,4)=='say:')return; // don't beleive say: events(creates unwanted recursion) when doing a.believe(*,fn)
+ if(this.event&&this.event.substring(0,8)=='set:say:')return; // don't believe say: events(creates unwanted recursion) when doing a.believe(*,fn)
if (!_.isEqual(that.get(key), value)) {
that.set(key, value, ttl);
if (callback) {

0 comments on commit 07c6493

Please sign in to comment.
Something went wrong with that request. Please try again.