Skip to content

Commit

Permalink
Merge pull request #260 from julianpoy/fix-sw-update-async
Browse files Browse the repository at this point in the history
Add error handling for async call to updateSW
  • Loading branch information
julianpoy authored May 16, 2019
2 parents 6172f81 + a7c278a commit 4df5bde
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Frontend/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ export class MyApp {
initUpdateListeners() {
// When user pauses app (device locks, switches tabs, etc) try to update SW
this.events.subscribe('application:multitasking:paused', () => {
(<any>window).updateSW();
try {
(<any>window).updateSW();
} catch(e) {}
});

window['onSWUpdate'] = () => {
Expand Down

0 comments on commit 4df5bde

Please sign in to comment.