diff --git a/index.js b/index.js index bca0054..18a5799 100644 --- a/index.js +++ b/index.js @@ -103,8 +103,10 @@ const VueNativeNotification = { if (e.name !== 'TypeError') return e - return navigator.serviceWorker.ready.then(reg => reg.showNotification(title, opts)) - .then(bindOnShow, bindOnError) + return navigator.serviceWorker.ready.then( + function (reg) { + reg.showNotification(title, opts) + }).then(bindOnShow, bindOnError) } }) }