Closed NoelDeMartin closed 5 years ago
Use removeListener
instead?
Would rename to stopTrackSession
for consistency.
@RubenVerborgh Ok it seems to work with removeListener
. Not sure why off
wasn't working, since the trackSession
method is implemented using on
. Anyways, it's working now, thank you :+1:.
In some situations, it may be desirable to stop tracking session status. This PR implements such a feature.
However, it's important to note that the Flow linter is currently throwing an error, but I'm not sure why. The error in particular is
Cannot call this.off because property off is missing in SolidAuthClient
. I'm not familiar with Flow, but I don't understand why is this failing. The off method exists in the parent class EventEmitter, so it should be ok. The test I implemented is also passing, so the implementation should be correct.