iriscouch / follow

Very stable, very reliable, NodeJS CouchDB _changes follower

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeError: Cannot read property 'debug' of undefined at Feed.stop

robertolicious opened this issue · comments

If follow is being stopped, without being started first, it throws a fatal error:

/server/node_modules/nano/node_modules/follow/lib/feed.js:511
  self.log.debug('Stop')
          ^
TypeError: Cannot read property 'debug' of undefined
    at Feed.stop (/server/node_modules/nano/node_modules/follow/lib/feed.js:511:11)

I am using follow as part of nano, and this code seems to break the application

var feed = db.follow({since: 'now'});

var feed.on('change', function(change){
    console.log(change);
})

feed.stop();

Environment

$ npm -v
2.5.1

$ node -v
v0.12.0

$ couchdb -V
couchdb - Apache CouchDB 1.6.1

$ npm list nano       
└── nano@6.1.2  extraneous