diff --git a/ts/util/createIPCEvents.ts b/ts/util/createIPCEvents.ts index 8ff79997520b..9006dd8cdad2 100644 --- a/ts/util/createIPCEvents.ts +++ b/ts/util/createIPCEvents.ts @@ -694,9 +694,9 @@ export function createIPCEvents( getMediaCameraPermissions: window.IPC.getMediaCameraPermissions, setMediaPlaybackDisabled: (playbackDisabled: boolean) => { - window.reduxActions.lightbox.setPlaybackDisabled(playbackDisabled); + window.reduxActions?.lightbox.setPlaybackDisabled(playbackDisabled); if (playbackDisabled) { - window.reduxActions.audioPlayer.pauseVoiceNotePlayer(); + window.reduxActions?.audioPlayer.pauseVoiceNotePlayer(); } },