We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 61012b4 commit bfa8917Copy full SHA for bfa8917
1 file changed
src/index.mjs
@@ -75,9 +75,9 @@ export default function (options) {
75
options = options || {
76
priority: 'low',
77
timeout: 2000,
78
- timeoutFn: requestIdleCallback,
79
};
80
- options.timeoutFn(() => {
+ const timeoutFn = options.timeoutFn || requestIdleCallback;
+ timeoutFn(() => {
81
// Prefetch an array of URLs if supplied (as an override)
82
if (options.urls !== undefined && options.urls.length > 0) {
83
prefetchURLs(options.urls, options.priority);
0 commit comments