We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb3a085 commit c0e45dfCopy full SHA for c0e45df
src/interceptor/user.interceptor.ts
@@ -32,7 +32,7 @@ export class UserInterceptor implements NestInterceptor {
32
}
33
} else if (ctxType === 'ws') {
34
const client = executionContext.switchToWs().getClient<Socket>();
35
- userId = client.data.userId;
+ userId = client.data?.userId ?? null;
36
37
return next.handle().pipe(
38
tap((responseBody) => {
0 commit comments