From a39352703b7183e5fd269df0e8887d52ce4bfc9d Mon Sep 17 00:00:00 2001 From: Nathan Kunicki Date: Thu, 2 Aug 2018 15:22:10 +0100 Subject: [PATCH] Better port checking --- hub.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hub.ts b/hub.ts index fcd37c8..46b338a 100644 --- a/hub.ts +++ b/hub.ts @@ -311,8 +311,8 @@ export class Hub extends EventEmitter { protected _portLookup (port: string) { - if (!this._ports[port]) { - throw new Error(`Port ${port} does not exist on this Hub type`); + if (!this._ports[port.toUpperCase()]) { + throw new Error(`Port ${port.toUpperCase()} does not exist on this Hub type`); } return this._ports[port]; }