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 @@ ...@@ -3,11 +3,9 @@
import Router from '../lib/router' import Router from '../lib/router'
import fetch from 'unfetch' import fetch from 'unfetch'
const originalRouteChangeComplete = Router.onRouteChangeComplete Router.ready(() => {
Router.onRouteChangeComplete = (...args) => { Router.router.on('routeChangeComplete', ping)
if (originalRouteChangeComplete) originalRouteChangeComplete(...args) })
ping()
}
async function ping () { async function ping () {
try { 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