Skip to content

Commit

Permalink
refactor: better inflate check
Browse files Browse the repository at this point in the history
Co-authored-by: Aura <kyradiscord@gmail.com>
  • Loading branch information
didinele and kyranet committed May 4, 2024
1 parent a6c8792 commit 6a76f2c
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 @@ -135,7 +135,7 @@ export class WebSocketShard extends AsyncEventEmitter<WebSocketShardEventsMap> {
* used, but rather the compression method that the user wants to use. This is because the libraries could just be missing.
*/
private get transportCompressionEnabled() {
return this.strategy.options.compression !== null && (Boolean(this.nativeInflate) || Boolean(this.zLibSyncInflate));
return this.strategy.options.compression !== null && (this.nativeInflate ?? this.zLibSyncInflate) !== null;
}

public get status(): WebSocketShardStatus {
Expand Down

0 comments on commit 6a76f2c

Please sign in to comment.