Skip to content
This repository was archived by the owner on Feb 23, 2025. It is now read-only.

Commit

Permalink
fix: fix usePlayerLoader
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-ogawa committed May 6, 2023
1 parent ec9f684 commit 4842dde
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/utils/youtube.ts
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,10 @@ export function usePlayerLoader(

const ref = useRefCallbackEffect<HTMLElement>((el) => {
if (el && mutation.isIdle) {
mutation.mutate(el);
// workaroudn for StrictMode? https://github.com/TanStack/query/issues/4983
window.setTimeout(() => {
mutation.mutate(el);
});
}
});

Expand Down

0 comments on commit 4842dde

Please sign in to comment.