Aminoid / react-native-activity-recognition

React Native wrapper for the Activity Recognition API.
GNU General Public License v2.0
92 stars 79 forks source link

Calling this.unsubscribe() twice #9

Open markrickert opened 6 years ago

markrickert commented 6 years ago

Should there be a guard in place where calling this.unsubscribe() when there are no active listeners on the object? Calling it twice generates an error and it would be nice if the module remembered the state and didn't call it if it wasn't necessary.

Having this guard in place would eliminate a lot of code in my project that's checking this.