Skip to content

Commit 7e6760a

Browse files
authored
Merge pull request #343 from den1sar/den1sar-fix-instanceof
Fix bug with instanceof of Array
2 parents e0f9400 + c966e71 commit 7e6760a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/centrifuge.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ export class Centrifuge extends (EventEmitter as new () => TypedEventEmitter<Cli
461461

462462
if (typeof this._endpoint === 'string') {
463463
// Single address.
464-
} else if (typeof this._endpoint === 'object' && this._endpoint instanceof Array) {
464+
} else if (Array.isArray(this._endpoint)) {
465465
this._transports = this._endpoint;
466466
this._emulation = true;
467467
for (const i in this._transports) {

0 commit comments

Comments
 (0)