Skip to content

Commit cad2ad4

Browse files
committed
fix: remove stale audioPrefs reference in PomodoroAudioLayer
The store subscription split left a remaining audioPrefs reference in the auto-switch effect, causing ReferenceError at runtime.
1 parent 1f2308b commit cad2ad4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎client/src/features/pomodoro/components/PomodoroAudioLayer.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export function PomodoroAudioLayer() {
7878

7979
// 阶段音轨自动切换(体验增强开关,默认关闭):休息/专注自动换音轨
8080
useEffect(() => {
81-
if (!autoSwitchAudioPhase || !audioPrefs.whiteNoiseEnabled) return;
81+
if (!autoSwitchAudioPhase || !whiteNoiseEnabled) return;
8282
const wantPhase = phase === 'work' ? 'focus' : 'break';
8383
if (whiteNoiseTrack.phase !== 'both' && whiteNoiseTrack.phase !== wantPhase) {
8484
const candidates = getTracksForPhase(wantPhase).filter((t) => t.category === 'white_noise');

0 commit comments

Comments
 (0)