Skip to content

Commit

Permalink
fix: correctly pass frames in invalidate (#3185)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlaricBaraou authored Mar 3, 2024
1 parent ffaf903 commit 05c96cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/fiber/src/core/loop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export function createLoop<TCanvas>(roots: Map<TCanvas, Root>) {
}

function invalidate(state?: RootState, frames = 1): void {
if (!state) return roots.forEach((root) => invalidate(root.store.getState()), frames)
if (!state) return roots.forEach((root) => invalidate(root.store.getState(), frames))
if (state.gl.xr?.isPresenting || !state.internal.active || state.frameloop === 'never') return
// Increase frames, do not go higher than 60
state.internal.frames = Math.min(60, state.internal.frames + frames)
Expand Down

0 comments on commit 05c96cf

Please sign in to comment.