Skip to content

Conversation

@VladimirPal
Copy link

@VladimirPal VladimirPal commented Oct 6, 2025

The updateService can be undefined when service workers are not available or not configured. This causes crashes when trying to call updateAuthData.

Add optional chaining (?.) to both updateService.updateAuthData calls in Client.js to prevent crashes in environments where service workers are not supported or configured.

Fixes crashes when updateService is undefined due to missing service worker configuration or unsupported browser environment.

Note: This bug has likely gone unnoticed because errors in the sync process are silently swallowed by empty catch blocks in Sync.js, making failures invisible.

The updateService can be undefined when service workers are not available
or not configured. This causes crashes when trying to call updateAuthData.

Add optional chaining (?.) to both updateService.updateAuthData calls
in Client.js to prevent crashes in environments where service workers
are not supported or configured.

Fixes crashes when updateService is undefined due to missing service
worker configuration or unsupported browser environment.

Signed-off-by: Vladimir Pal <this@vlad-pal.net>
@VladimirPal VladimirPal force-pushed the fix/updateservice-optional-chaining branch from 4f8e40c to 5c7fb12 Compare October 6, 2025 16:13
@VladimirPal VladimirPal changed the title Fix: Add optional chaining to updateService calls Fix: Prevent crashes when updateService undefined Oct 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant