Commit bb7c8f87 authored by Arunoda Susiripala's avatar Arunoda Susiripala Committed by Guillermo Rauch

Use a private Router event API for the ondemand-pinger. (#1397)

parent 02e697cb
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment