Skip to content

Commit

Permalink
Fix requestAnimationFrame causing error in Firefox extension (#60)
Browse files Browse the repository at this point in the history
Fix requestAnimationFrame causing crash in Firefox extension
  • Loading branch information
Mr-Quin authored Feb 5, 2025
1 parent b48043f commit e5138aa
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/utils.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export /* istanbul ignore next */ var raf =
export /* istanbul ignore next */ var raf = (
(
typeof window !== 'undefined' &&
(
Expand All @@ -9,9 +9,10 @@ export /* istanbul ignore next */ var raf =
) ||
function(cb) {
return setTimeout(cb, 50 / 3);
};
}
).bind(window);

export /* istanbul ignore next */ var caf =
export /* istanbul ignore next */ var caf = (
(
typeof window !== 'undefined' &&
(
Expand All @@ -20,7 +21,8 @@ export /* istanbul ignore next */ var caf =
window.webkitCancelAnimationFrame
)
) ||
clearTimeout;
clearTimeout
).bind(window);

export function binsearch(arr, prop, key) {
var mid = 0;
Expand Down

0 comments on commit e5138aa

Please sign in to comment.