From b7c4879b8b90e4410b80317ab05ed6f0ec8aa544 Mon Sep 17 00:00:00 2001 From: Horatiu Muresan Date: Thu, 16 Feb 2023 17:38:03 +0200 Subject: [PATCH] fix after review --- modules/API/API.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/modules/API/API.js b/modules/API/API.js index 92729ada1..83112b7b3 100644 --- a/modules/API/API.js +++ b/modules/API/API.js @@ -249,11 +249,15 @@ function initCommands() { // if id not provided, unpin everybody. if (!id) { - const pinnedParticipants = getPinnedActiveParticipants(state); + if (isStageFilmstripAvailable(state)) { + const pinnedParticipants = getPinnedActiveParticipants(state); - pinnedParticipants?.forEach(p => { - APP.store.dispatch(togglePinStageParticipant(p.participantId)); - }); + pinnedParticipants?.forEach(p => { + APP.store.dispatch(togglePinStageParticipant(p.participantId)); + }); + } else { + APP.store.dispatch(pinParticipant()); + } return; }