Skip to content

Commit 97c43ed

Browse files
committed
Fix issue with mute action and saga
1 parent 6e8fdb8 commit 97c43ed

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/components/Audio/Audio.sagas.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,7 @@ function* onVolumeMuteToggle() {
2121
const audio = yield select(_audio)
2222
const muted = yield select(_muted)
2323

24-
if (muted) {
25-
audio.muted = true
26-
} else {
27-
audio.muted = false
28-
}
24+
audio.muted = !muted
2925

3026
yield put({type: types.AUDIO__AUDIO_UPDATED, audio,})
3127
}

src/components/Audio/Audio.units.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const playing = (paused) => !paused
1515
export const muted = ({ muted }) => muted
1616

1717
export const volumeFormatted = (volume, muted) => {
18-
return muted ? 0 : volume
18+
return volume
1919
}
2020

2121

0 commit comments

Comments
 (0)