diff --git a/src/libs/actions/Link.ts b/src/libs/actions/Link.ts index 0250ea7b84a1..8d367c7eeec2 100644 --- a/src/libs/actions/Link.ts +++ b/src/libs/actions/Link.ts @@ -183,10 +183,12 @@ function openLink(href: string, environmentURL: string, isAttachment = false) { Navigation.navigate(internalNewExpensifyPath as Route); return; } + const OLD_DOT_PUBLIC_URLS: string[] = [CONST.TERMS_URL, CONST.PRIVACY_URL]; // If we are handling an old dot Expensify link we need to open it with openOldDotLink() so we can navigate to it with the user already logged in. // As attachments also use expensify.com we don't want it working the same as links. - if (internalExpensifyPath && !isAttachment) { + const isPublicOldDotURL = OLD_DOT_PUBLIC_URLS.includes(href); + if (internalExpensifyPath && !isAttachment && !isPublicOldDotURL) { openOldDotLink(internalExpensifyPath); return; }