File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -771,17 +771,17 @@ export class ServiceWorker {
771771 const defaultNotificationUrlFromConfig = config . origin ;
772772 if ( defaultNotificationUrlFromConfig ) {
773773 launchUrl = defaultNotificationUrlFromConfig ;
774+
775+ if ( ! dbDefaultNotificationUrl ) {
776+ // intentionally not awaiting this promise to not block notification click handling
777+ Database . setAppState ( { defaultNotificationUrl : defaultNotificationUrlFromConfig } ) . catch ( e => {
778+ Log . error ( "Failed to save default notification url to db" , e ) ;
779+ } ) ;
780+ }
774781 }
775782 } catch ( e ) {
776783 Log . error ( "Failed to get app config to determine default notification url" , e ) ;
777784 }
778-
779- if ( ! ! launchUrl && ! dbDefaultNotificationUrl ) {
780- // intentionally not awaiting this promise to not block notification click handling
781- Database . setAppState ( { defaultNotificationUrl : launchUrl } ) . catch ( e => {
782- Log . error ( "Failed to save default notification url to db" , e ) ;
783- } ) ;
784- }
785785 }
786786
787787 // If the user clicked an action button, use the URL provided by the action button
You can’t perform that action at this time.
0 commit comments