From 389788709a12ab42f16e194026c5cdb617c598a8 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 24 Aug 2021 15:56:23 +0100 Subject: [PATCH] Prevent opening a screen modal if already inside a screen modal --- packages/client/src/utils/buttonActions.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/client/src/utils/buttonActions.js b/packages/client/src/utils/buttonActions.js index 408b35a705..f55c422a6a 100644 --- a/packages/client/src/utils/buttonActions.js +++ b/packages/client/src/utils/buttonActions.js @@ -42,7 +42,9 @@ const triggerAutomationHandler = async action => { const navigationHandler = action => { const { url, peek } = action.parameters if (url) { - if (peek) { + // If we're already peeking, don't peek again + const isPeeking = get(routeStore).queryParams?.peek + if (peek && !isPeeking) { peekStore.actions.showPeek(url) } else { const external = !url.startsWith("/")