Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Incorrect types for TimeRepresentation #2285

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

cmaddox5
Copy link
Contributor

@cmaddox5 cmaddox5 commented Nov 4, 2024

The type value we send to the client is always a lowercase atom converted to a string. For some reason, the client code was looking for an uppercase version of each value. This was causing the div that holds the time to be empty.

Before:
Screenshot 2024-11-04 at 8 17 49 AM

After:
Screenshot 2024-11-04 at 8 33 53 AM

@cmaddox5 cmaddox5 requested a review from a team as a code owner November 4, 2024 13:38
@cmaddox5 cmaddox5 merged commit ca36538 into main Nov 4, 2024
13 checks passed
@cmaddox5 cmaddox5 deleted the cm/correct-case-cr-dept-times branch November 4, 2024 14:11
@digitalcora
Copy link
Contributor

I think this was my mistake — in #2280, as part of "inlining" a v1 E-ink component that was reused by Pre-Fares (😬), I removed code in these conditionals that was calling toUpperCase on the type field before comparing it. Since the type was defined as uppercase (which this PR fixes), I assumed that was an accurate reflection of what the server sent. In reality it was probably that the v1 code used uppercase and v2 used lowercase, and to make the component work with both screen types, this toUpperCase was thrown in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants