Skip to content

Commit

Permalink
Merge pull request #11186 from CodyTseng/fix-ws-adaptor-filter-non-ni…
Browse files Browse the repository at this point in the history
…l-result

fix(ws): filter only nil results
  • Loading branch information
kamilmysliwiec committed Mar 10, 2023
2 parents 8b72c52 + 6f8f111 commit 797b088
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/platform-ws/adapters/ws-adapter.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { INestApplicationContext, Logger } from '@nestjs/common';
import { loadPackage } from '@nestjs/common/utils/load-package.util';
import { isNil } from '@nestjs/common/utils/shared.utils';
import { AbstractWsAdapter } from '@nestjs/websockets';
import {
CLOSE_EVENT,
Expand Down Expand Up @@ -109,7 +110,7 @@ export class WsAdapter extends AbstractWsAdapter {
const source$ = fromEvent(client, 'message').pipe(
mergeMap(data =>
this.bindMessageHandler(data, handlers, transform).pipe(
filter(result => result),
filter(result => !isNil(result)),
),
),
takeUntil(close$),
Expand Down

0 comments on commit 797b088

Please sign in to comment.