iriscouch / follow

Very stable, very reliable, NodeJS CouchDB _changes follower
Apache License 2.0
393 stars 82 forks source link

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

Open robertolicious opened 9 years ago

robertolicious commented 9 years ago

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