Symptom
For users who have not set a unit preference, the workout card shows no unit next to weights (e.g. "80" instead of "80 kg"). The unitSystem getter returns undefined instead of the default "metric".
Expected
When a user has no settings or no unitSystem set, the getter should default to "metric".
What you know
The WorkoutCardModel class reads this.user?.settings?.unitSystem using optional chaining. When the user object has no settings property, the chain short-circuits to undefined -- but there is no fallback.
Hints
TypeScript
TypeScript ready
Test Output
▶
Click "Run Tests" to execute your code