From 85eee16002641bee4e2d0aa5fbfcdcc2ccec0609 Mon Sep 17 00:00:00 2001 From: Vit Horacek <36083550+mountiny@users.noreply.github.com> Date: Tue, 17 Oct 2023 17:27:45 +0100 Subject: [PATCH] Merge pull request #29792 from bernhardoj/fix/29747 Fix CreateChatReport is still called when visiting /money2020 for the second time (cherry picked from commit 6d937cc67827c697e6f5e94771fcdfe7064aa4e8) --- src/libs/actions/DemoActions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/actions/DemoActions.js b/src/libs/actions/DemoActions.js index 29c983c35262..bbc46716b267 100644 --- a/src/libs/actions/DemoActions.js +++ b/src/libs/actions/DemoActions.js @@ -17,7 +17,7 @@ Onyx.connect({ function runMoney2020Demo() { // Try to navigate to existing demo chat if it exists in Onyx - const money2020AccountID = Number(Config ? Config.EXPENSIFY_ACCOUNT_ID_MONEY2020 : 15864555); + const money2020AccountID = Number(lodashGet(Config, 'EXPENSIFY_ACCOUNT_ID_MONEY2020', 15864555)); const existingChatReport = ReportUtils.getChatByParticipants([money2020AccountID]); if (existingChatReport) { // We must call goBack() to remove the demo route from nav history