Better port checking

This commit is contained in:
Nathan Kunicki 2018-08-02 15:22:10 +01:00
parent 82436b9408
commit a39352703b

4
hub.ts
View File

@ -311,8 +311,8 @@ export class Hub extends EventEmitter {
protected _portLookup (port: string) { protected _portLookup (port: string) {
if (!this._ports[port]) { if (!this._ports[port.toUpperCase()]) {
throw new Error(`Port ${port} does not exist on this Hub type`); throw new Error(`Port ${port.toUpperCase()} does not exist on this Hub type`);
} }
return this._ports[port]; return this._ports[port];
} }