Skip to content

Commit

Permalink
fix(ui): remove before install prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
ncarlier committed Oct 5, 2019
1 parent 7dae1d9 commit 4aee367
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 0 additions & 5 deletions ui/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ import { getOnlineStatus } from './helpers'
import { setupNotification } from './notification'
import * as serviceWorker from './serviceWorker'

window.addEventListener('beforeinstallprompt', e => {
e.preventDefault()
window.deferredPrompt = e
})

const run = () => {
const history = createBrowserHistory()
const initialState = window.initialReduxState
Expand Down
4 changes: 2 additions & 2 deletions ui/src/serviceWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ export function register(config?: Config) {
return
}

window.addEventListener('beforeinstallprompt', (e: any) => {
window.addEventListener('beforeinstallprompt', e => {
e.preventDefault()
e.prompt()
window.deferredPrompt = e
})

window.addEventListener('load', () => {
Expand Down

0 comments on commit 4aee367

Please sign in to comment.