diff --git a/libraries/BLE/src/BLEScan.cpp b/libraries/BLE/src/BLEScan.cpp index c93a30c5..e17eb2b0 100644 --- a/libraries/BLE/src/BLEScan.cpp +++ b/libraries/BLE/src/BLEScan.cpp @@ -126,7 +126,8 @@ void BLEScan::handleGAPEvent( if (m_pAdvertisedDeviceCallbacks) { // if has callback, no need to record to vector m_pAdvertisedDeviceCallbacks->onResult(*advertisedDevice); - } else if (!m_wantDuplicates && !found) { // if no callback and not want duplicate, and not already in vector, record it + } + if (!m_wantDuplicates && !found) { // if no callback and not want duplicate, and not already in vector, record it m_scanResults.m_vectorAdvertisedDevices.insert(std::pair(advertisedAddress.toString(), advertisedDevice)); shouldDelete = false; }