From c1802c9c5961b13e96ed71fd80c64641a0168870 Mon Sep 17 00:00:00 2001 From: omaroughriss Date: Thu, 27 Nov 2025 16:50:20 +0100 Subject: [PATCH] Minor fix --- src/services/database.service.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/services/database.service.ts b/src/services/database.service.ts index e28e653..7199929 100755 --- a/src/services/database.service.ts +++ b/src/services/database.service.ts @@ -1,6 +1,13 @@ import Services from './service'; +/** + * Database service managing IndexedDB operations via Web Worker and Service Worker + */ export class Database { + // ============================================ + // PRIVATE PROPERTIES + // ============================================ + private static instance: Database; private serviceWorkerRegistration: ServiceWorkerRegistration | null = null; private serviceWorkerCheckIntervalId: number | null = null; @@ -155,13 +162,11 @@ export class Database { }); } - private async checkForUpdates() { + private async checkForUpdates(): Promise { if (this.serviceWorkerRegistration) { - // Check for updates to the service worker try { await this.serviceWorkerRegistration.update(); - // If there's a new worker waiting, activate it immediately if (this.serviceWorkerRegistration.waiting) { this.serviceWorkerRegistration.waiting.postMessage({ type: 'SKIP_WAITING' }); }