Skip to content

Commit

Permalink
fix: cannot read properties of undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
davidrdsilva committed Jun 25, 2024
1 parent 0d48565 commit 22b526c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/providers/user.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export class UserService {
async setToOffline(request: Request) {
const user: User = request['user'];
const jobs = await this.onlineUsersQueue.getWaiting();
const onlineUser = jobs.find((job) => job.data === user.username);
const onlineUser = jobs.find((job) => job?.data === user.username);

return await onlineUser
.remove()
Expand Down

0 comments on commit 22b526c

Please sign in to comment.