Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

inline single usage of compareId

Ivan Kuchin67a25630a388
diff --git a/frontend/src/app/core/state/compare-id.ts b/frontend/src/app/core/state/compare-id.ts
deleted file mode 100644
index fa75b838cd4..00000000000
--- a/frontend/src/app/core/state/compare-id.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-//-- copyright
-// OpenProject is an open source project management software.
-// Copyright (C) the OpenProject GmbH
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License version 3.
-//
-// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
-// Copyright (C) 2006-2013 Jean-Philippe Lang
-// Copyright (C) 2010-2013 the ChiliProject Team
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-//
-// See COPYRIGHT and LICENSE files for more details.
-//++
-
-import { ID } from '@datorama/akita';
-
-export default function compareId(a:ID, b:ID):boolean {
- return String(a) === String(b);
-}
diff --git a/frontend/src/app/shared/components/storages/storage/storage.component.ts b/frontend/src/app/shared/components/storages/storage/storage.component.ts
index cf793d2e2f3..96bee30c733 100644
--- a/frontend/src/app/shared/components/storages/storage/storage.component.ts
+++ b/frontend/src/app/shared/components/storages/storage/storage.component.ts
@@ -90,7 +90,6 @@ import {
} from 'core-app/shared/components/storages/upload-conflict-modal/upload-conflict-modal.component';
import { LocationData, UploadData } from 'core-app/shared/components/storages/storage/interfaces';
import isNotNull from 'core-app/core/state/is-not-null';
-import compareId from 'core-app/core/state/compare-id';
import isHttpResponse from 'core-app/core/upload/is-http-response';
import isNewResource from 'core-app/features/hal/helpers/is-new-resource';
import { StoragesResourceService } from 'core-app/core/state/storages/storages.service';
@@ -498,7 +497,7 @@ export class StorageComponent extends UntilDestroyedMixin implements OnInit, OnD
.pipe(
take(1),
map((fileLinks) => {
- const existingFileLink = fileLinks.find((l) => compareId(l.originData.id, response.id));
+ const existingFileLink = fileLinks.find((l) => String(l.originData.id) === String(response.id));
if (existingFileLink) {
return null;
}