bearnithi / bn-ng-idle

Angular user idle detector service
28 stars 11 forks source link

unsubscribe of undefined calling resetTimer #2

Closed Skied closed 4 years ago

Skied commented 5 years ago

calling resetTimer before starting idle throws the error:

ERROR TypeError: Cannot read property 'unsubscribe' of undefined at BnNgIdleService.push../node_modules/bn-ng-idle/fesm5/bn-ng-idle.js.BnNgIdleService.resetTimer (bn-ng-idle.js:49)

bearnithi commented 5 years ago

You should start the idle, only then you can reset the timer using resetTimer method.