From 822d3da5d97765bbcb4745e60d4db8ee26785268 Mon Sep 17 00:00:00 2001 From: Michal Szafranski Date: Sat, 2 Nov 2019 09:37:18 +0100 Subject: [PATCH] Fix ts error --- src/wedo2smarthub.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wedo2smarthub.ts b/src/wedo2smarthub.ts index 143c6cf..d1d6965 100644 --- a/src/wedo2smarthub.ts +++ b/src/wedo2smarthub.ts @@ -315,7 +315,7 @@ export class WeDo2SmartHub extends Hub { const keys = Object.keys(Consts.BLECharacteristic); for (let i = 0; i < keys.length; i++) { const key = keys[i]; - if (Consts.BLECharacteristic[key as any] === uuid) { + if (Consts.BLECharacteristic[key as keyof typeof Consts.BLECharacteristic] === uuid) { return key; } }