Skip to content

Commit

Permalink
Reapply requestAnimationFrame polyfill
Browse files Browse the repository at this point in the history
  • Loading branch information
rmarscher committed Jan 5, 2024
1 parent 679aee7 commit 471dd9c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion apps/next/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
if (typeof requestAnimationFrame === 'undefined') {
globalThis.requestAnimationFrame = setImmediate
if (typeof setImmediate !== 'undefined') {
globalThis.requestAnimationFrame = setImmediate
} else {
globalThis.requestAnimationFrame = (callback) => {
const now = Date.now()
callback(now)
return now
}
}
}
import '@tamagui/core/reset.css'
import '@tamagui/font-inter/css/400.css'
Expand Down

0 comments on commit 471dd9c

Please sign in to comment.