alexkendall / react-native-bluetooth-cross-platform

Cross-Platform Bluetooth & WiFi React Native Module. Powered by underdark http://underdark.io/.
179 stars 35 forks source link

Initialize broadcastTimer to null and check if timer is null before… #37

Closed azanli closed 6 years ago

azanli commented 6 years ago

…attempting to invoke cancel()

Patch in reference to #36

The only difference is that broadcastTimer is initialized to null value since that is what it becomes after broadcastTimer.cancel(), so that it can be checked against that value, i.e. broadcastTimer != null before invoking broadcastTimer.cancel(). `

alexkendall commented 6 years ago

Looks good.