From 71524f3531e2aa4eddf8f40f2b2435a9183c0815 Mon Sep 17 00:00:00 2001 From: tonyawad Date: Fri, 6 Apr 2018 00:12:52 -0400 Subject: [PATCH] minor async change --- src/components/my-app/my-app.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/my-app/my-app.tsx b/src/components/my-app/my-app.tsx index 36126de..e67bd1e 100644 --- a/src/components/my-app/my-app.tsx +++ b/src/components/my-app/my-app.tsx @@ -33,8 +33,9 @@ export class MyApp { } @Listen('body:ionToastWillDismiss') - reload() { - navigator.serviceWorker.getRegistration().then(x=> x.update()); + async reload() { + var registration = await navigator.serviceWorker.getRegistration(); + registration.update(); window.location.reload(); }