From 98f1ca84b0381606f737760b1e119c616202f5e8 Mon Sep 17 00:00:00 2001 From: Michal Szafranski Date: Sat, 2 Nov 2019 10:36:06 +0100 Subject: [PATCH] allow switching to mode 0 --- src/hub.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hub.ts b/src/hub.ts index 9702d29..d526de2 100644 --- a/src/hub.ts +++ b/src/hub.ts @@ -149,7 +149,7 @@ export class Hub extends EventEmitter { public subscribe (port: string, mode?: number) { return new Promise((resolve, reject) => { let newMode = this._getModeForDeviceType(this._portLookup(port).type); - if (mode) { + if (mode !== undefined) { newMode = mode; } this._activatePortDevice(this._portLookup(port).value, this._portLookup(port).type, newMode, 0x00, () => {