From c5b8f49f251109695dc100519fd959826a5b781d Mon Sep 17 00:00:00 2001 From: ayumi-signal <143036029+ayumi-signal@users.noreply.github.com> Date: Wed, 21 Feb 2024 10:54:33 -0800 Subject: [PATCH] Fix setMediaPlaybackDisabled when reduxActions not ready --- ts/util/createIPCEvents.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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(); } },