Skip to content

Commit

Permalink
Resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
BartoszGrajdek committed Sep 12, 2023
1 parent 9a36134 commit 5f7bada
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/libs/tryResolveUrlFromApiRoot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

0 comments on commit 5f7bada

Please sign in to comment.