Skip to content

Commit

Permalink
Use a private Router event API for the ondemand-pinger. (#1397)
Browse files Browse the repository at this point in the history
  • Loading branch information
arunoda authored and rauchg committed Mar 13, 2017
1 parent 02e697c commit bb7c8f8
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions client/on-demand-entries-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@
import Router from '../lib/router'
import fetch from 'unfetch'

const originalRouteChangeComplete = Router.onRouteChangeComplete
Router.onRouteChangeComplete = (...args) => {
if (originalRouteChangeComplete) originalRouteChangeComplete(...args)
ping()
}
Router.ready(() => {
Router.router.on('routeChangeComplete', ping)
})

async function ping () {
try {
Expand Down

0 comments on commit bb7c8f8

Please sign in to comment.