From d1c8b771e7c4ef49a09e496eade9b6e49576bcf4 Mon Sep 17 00:00:00 2001 From: adkif <45813955+adkif@users.noreply.github.com> Date: Sat, 3 Feb 2024 14:49:22 +0200 Subject: [PATCH] fix: deepscan --- .../desktop-libs/src/lib/offline/services/timer.service.ts | 4 ++-- .../desktop-libs/src/lib/offline/services/user.service.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/desktop-libs/src/lib/offline/services/timer.service.ts b/packages/desktop-libs/src/lib/offline/services/timer.service.ts index 28d0a07ab47..98cdd4bc426 100644 --- a/packages/desktop-libs/src/lib/offline/services/timer.service.ts +++ b/packages/desktop-libs/src/lib/offline/services/timer.service.ts @@ -34,7 +34,7 @@ export class TimerService implements ITimerService { public async update(timer: Partial): Promise { try { - if (!timer && !timer.id) { + if (!timer.id) { return console.error('WARN[TIMER_SERVICE]: No timer data, cannot update'); } await this._timerDAO.update(timer.id, timer.toObject()); @@ -54,7 +54,7 @@ export class TimerService implements ITimerService { public async findById(timer: Partial): Promise { try { - if (!timer && !timer.id) { + if (!timer.id) { console.error('WARN[TIMER_SERVICE]: No timer data, cannot find'); return null; } diff --git a/packages/desktop-libs/src/lib/offline/services/user.service.ts b/packages/desktop-libs/src/lib/offline/services/user.service.ts index e58dbccf54a..a4c5a751597 100644 --- a/packages/desktop-libs/src/lib/offline/services/user.service.ts +++ b/packages/desktop-libs/src/lib/offline/services/user.service.ts @@ -24,7 +24,7 @@ export class UserService implements IUserService { public async update(user: Partial): Promise { try { - if (!user && !user.id) { + if (!user.id) { return console.error('WARN[USER_SERVICE]: No user data, cannot update'); } await this._userDAO.update(user.id, user);