From 32821dfb2a7a82f6f9d20373f7a73c899248a723 Mon Sep 17 00:00:00 2001 From: icanos Date: Sat, 18 Jan 2020 16:06:48 +0000 Subject: [PATCH] bug fix --- plejd/ble.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plejd/ble.js b/plejd/ble.js index fbddafa..3be5d58 100644 --- a/plejd/ble.js +++ b/plejd/ble.js @@ -198,7 +198,7 @@ class PlejdService extends EventEmitter { } if (!uuid) { - this.sortedDevices = Object.values(this.devices).sort((a, b) => b.rssi - a.rssi); + sortedDevices = Object.values(this.devices).sort((a, b) => b.rssi - a.rssi); this.device = sortedDevices[this.deviceIdx]; } else {