From 5f7bada1bd307272469b383e7e95cf0b77230b69 Mon Sep 17 00:00:00 2001 From: Bartosz Grajdek Date: Tue, 12 Sep 2023 15:27:03 +0200 Subject: [PATCH] Resolve conflicts --- src/libs/tryResolveUrlFromApiRoot.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/libs/tryResolveUrlFromApiRoot.ts b/src/libs/tryResolveUrlFromApiRoot.ts index 251366cb3488..f9aef09a00a7 100644 --- a/src/libs/tryResolveUrlFromApiRoot.ts +++ b/src/libs/tryResolveUrlFromApiRoot.ts @@ -16,16 +16,16 @@ const ORIGIN_PATTERN = new RegExp(`^(${ORIGINS_TO_REPLACE.join('|')})`); * or `https://staging.expensify` part, with `https://{API_ROOT}` * - Unmatched URLs (non expensify) are returned with no modifications */ -<<<<<<< HEAD:src/libs/tryResolveUrlFromApiRoot.ts -export default function tryResolveUrlFromApiRoot(url: string): string { -======= -export default function tryResolveUrlFromApiRoot(url) { +function tryResolveUrlFromApiRoot(url: string): string; +function tryResolveUrlFromApiRoot(url: number): number; +function tryResolveUrlFromApiRoot(url: string | number): string | number { // in native, when we import an image asset, it will have a number representation which can be used in `source` of Image // in this case we can skip the url resolving if (typeof url === 'number') { return url; } ->>>>>>> origin/main:src/libs/tryResolveUrlFromApiRoot.js const apiRoot = ApiUtils.getApiRoot({shouldUseSecure: false}); return url.replace(ORIGIN_PATTERN, apiRoot); } + +export default tryResolveUrlFromApiRoot;