diff --git a/desktop/src/app/components/project/download-project.component.ts b/desktop/src/app/components/project/download-project.component.ts index 8b3126ed32..4dbd993b21 100644 --- a/desktop/src/app/components/project/download-project.component.ts +++ b/desktop/src/app/components/project/download-project.component.ts @@ -351,7 +351,7 @@ export class DownloadProjectComponent { const url: string = this.url?.trim(); // Prevent trying to download project from own database - return url.includes(address.ip()) + return url.replace('http://', '').replace(':3000', '') === address.ip() ? '.' : url; } diff --git a/desktop/src/app/services/settings/sync-target.ts b/desktop/src/app/services/settings/sync-target.ts index 7b658e4bd6..e4455d9af0 100644 --- a/desktop/src/app/services/settings/sync-target.ts +++ b/desktop/src/app/services/settings/sync-target.ts @@ -19,7 +19,7 @@ export module SyncTarget { if (!syncTarget) return undefined; // Prevent trying to synchronize with own database - return syncTarget.address.includes(address.ip()) + return syncTarget.address.trim().replace('http://', '').replace(':3000', '') === address.ip() ? '.' : syncTarget.address; }