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

Prevent returning after a single loop before new user can be appended… #35

Closed azanli closed 6 years ago

azanli commented 6 years ago

… to nearbyUsers and emit "detectedUser"

Fixes issue #32

The for loop was returning after the first loop regardless of whether the user was already detected or not. This change will make it return only if the user actually exists, otherwise it will append the user to nearbyUsers and emit "detectedUser".