Permalink
Browse files

small fix believe event!=='say:' to event!=='set:say:'

  • Loading branch information...
1 parent 1459930 commit d53fbdf3706f1203c8a19917fcb0f6232cbba711 @shimondoodkin shimondoodkin committed Jun 24, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/telepathine.js
View
@@ -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 d53fbdf

Please sign in to comment.