Skip to content

Commit

Permalink
chore: vlad's nit
Browse files Browse the repository at this point in the history
  • Loading branch information
didinele committed Mar 25, 2023
1 parent 97000c6 commit 196bbcd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/ws/src/ws/WebSocketShard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ export class WebSocketShard extends AsyncEventEmitter<WebSocketShardEventsMap> {
// As stated previously, any other error would have been caused by us emitting the error event, which looks
// like { error: unknown }
// eslint-disable-next-line no-ex-assign
error = isAbortError ? error : (error as { error: unknown }).error;
error = error instanceof Error ? error : (error as { error: unknown }).error;

// If the user has no handling on their end (error event) simply throw.
// We also want to throw if we're still in the initial `connect()` call, since that's the only time
Expand Down

0 comments on commit 196bbcd

Please sign in to comment.