Skip to content

Commit

Permalink
Check if requestIdleCallback exists in window
Browse files Browse the repository at this point in the history
  • Loading branch information
dieulot committed Jul 30, 2019
1 parent fd874f6 commit 962e513
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/request-idle-callback.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
**/

// RIC and shim for browsers setTimeout() without it
const requestIdleCallback = requestIdleCallback ||
const requestIdleCallback = window.requestIdleCallback ||
function (cb) {
const start = Date.now();
return setTimeout(function () {
Expand Down

0 comments on commit 962e513

Please sign in to comment.