Skip to content

Commit

Permalink
fix: handling of units in case card (#1335)
Browse files Browse the repository at this point in the history
  • Loading branch information
kswenson authored Jul 11, 2024
1 parent 4cac20f commit 425da87
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion v3/src/models/v2/dg-attribute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ export class DGAttribute extends SCObject {
}

get(prop: string) {
return super.get(prop) ?? (this.attribute as any)[prop]
let result = super.get(prop) ?? (this.attribute as any)[prop]
if (result == null && prop === "unit") {
result = super.get("units") ?? this.attribute.units
}
return result
}

get collection() {
Expand Down

0 comments on commit 425da87

Please sign in to comment.