Skip to content

Commit

Permalink
fix: moved set-state out of for-each
Browse files Browse the repository at this point in the history
  • Loading branch information
malmen237 committed Apr 19, 2024
1 parent cfbb9e9 commit fed64bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/production-line/production-line.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ export const ProductionLine: FC = () => {
audioElements.forEach((singleElement: HTMLAudioElement) => {
// eslint-disable-next-line no-param-reassign
singleElement.muted = !isOutputMuted;
setIsOutputMuted(!isOutputMuted);
});
setIsOutputMuted(!isOutputMuted);
}, [audioElements, isOutputMuted]);

const line = useLinePolling({ joinProductionOptions });
Expand Down

0 comments on commit fed64bd

Please sign in to comment.