From 13bacd4a1edcd0471b6d62fddf1517bdc72a2862 Mon Sep 17 00:00:00 2001 From: Parvesh Monu Date: Thu, 4 Aug 2022 23:05:20 +0530 Subject: [PATCH] fix error when switching dark/light mode while splash screen is shown (#13759) --- src/status_im/events.cljs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/status_im/events.cljs b/src/status_im/events.cljs index 7eab1ecf85..0b76f87dc9 100644 --- a/src/status_im/events.cljs +++ b/src/status_im/events.cljs @@ -144,9 +144,8 @@ (conj {:ms 900 :dispatch [:navigate-to :create-community-channel (get-in db [:navigation/screen-params :create-community-channel])]}))] - - (navigation.core/dismiss-all-modals) - (when (or (nil? cur-theme) (zero? cur-theme)) + (when (and (some? root-id) (or (nil? cur-theme) (zero? cur-theme))) + (navigation.core/dismiss-all-modals) (fx/merge cofx (merge {::multiaccounts/switch-theme (if (= :dark theme) 2 1)}