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

Fix typing in changeset

Oliver Günther0aed3fa00c99
diff --git a/frontend/src/app/shared/components/fields/changeset/resource-changeset.ts b/frontend/src/app/shared/components/fields/changeset/resource-changeset.ts
index d1979efaec6..295619ca64f 100644
--- a/frontend/src/app/shared/components/fields/changeset/resource-changeset.ts
+++ b/frontend/src/app/shared/components/fields/changeset/resource-changeset.ts
@@ -239,15 +239,15 @@ export class ResourceChangeset<T extends HalResource = HalResource> {
* @param {string} key The attribute to read
* @return {any} Either the value from the overridden change, or the default value
*/
- public value<T>(key:string):T {
+ public value<R>(key:string):R {
// Overridden value by user?
if (this.changeset.contains(key)) {
- return this.changeset.getValue(key) as T;
+ return this.changeset.getValue(key) as R;
}
// Return whatever is on the base.
// TODO this needs to be typed
- return this.pristineResource[key] as T;
+ return this.pristineResource[key] as R;
}
/**