Better port checking
This commit is contained in:
parent
82436b9408
commit
a39352703b
4
hub.ts
4
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];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user