From 9845aec05a631edb92216ef728101cf1ebc9221b Mon Sep 17 00:00:00 2001 From: Marc Glasser Date: Tue, 5 Dec 2023 09:09:39 -1000 Subject: [PATCH] Tell TS this is a Route --- src/libs/actions/Link.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/actions/Link.ts b/src/libs/actions/Link.ts index 5ee15c1cd1d0..e6d33fec118d 100644 --- a/src/libs/actions/Link.ts +++ b/src/libs/actions/Link.ts @@ -7,7 +7,7 @@ import * as Url from '@libs/Url'; import CONFIG from '@src/CONFIG'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; -import ROUTES from '@src/ROUTES'; +import ROUTES, {Route} from '@src/ROUTES'; let isNetworkOffline = false; Onyx.connect({ @@ -100,7 +100,7 @@ function openLink(href: string, environmentURL: string, isAttachment = false) { // If we are handling a New Expensify link then we will assume this should be opened by the app internally. This ensures that the links are opened internally via react-navigation // instead of in a new tab or with a page refresh (which is the default behavior of an anchor tag) if (internalNewExpensifyPath && hasSameOrigin) { - Navigation.navigate(internalNewExpensifyPath); + Navigation.navigate(internalNewExpensifyPath as Route); return; }