We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 396a7fe commit ccd762fCopy full SHA for ccd762f
src/index.js
@@ -17,7 +17,7 @@ function installRouterPrefetch(
17
18
const requestIdleCallback =
19
(inBrowser && window.requestIdleCallback) ||
20
- function(cb) {
+ function(cb, { timeout = 1 }) {
21
const start = Date.now()
22
return setTimeout(() => {
23
cb({
@@ -26,7 +26,7 @@ function installRouterPrefetch(
26
return Math.max(0, 50 - (Date.now() - start))
27
}
28
})
29
- }, 1)
+ }, timeout)
30
31
32
const RouterLink = Vue.component('RouterLink') || Vue.component('router-link')
0 commit comments