Repository navigation
fix: fix unterminated template literals in filterPending.ts and vite-env.d.ts - #1491
Closed
HRamiroAlbornoz wants to merge 1 commit into
Closed
HRamiroAlbornoz wants to merge 1 commit into
HRamiroAlbornoz wants to merge 1 commit into
Conversation
…env.d.ts - Replace broken if (normalize\Milestone) with if (normalizedMilestone) - Add missing backticks to template literal strings in EnvConfigError calls Fixes Disciplr-Org#1489
Sensei-Victor
pushed a commit
to Sensei-Victor/Disciplr-Frontend
that referenced
this pull request
Oct 5, 2026
CurrencyContext.tsx was checking data.currency after fetching /api/account/preferences. That field does not exist in the preferences schema (preferencesSchema / PreferencesData); the canonical field name is displayCurrency. As a result the if-check always failed, setCurrency was never called, and useCurrencyPreference silently returned the hardcoded USD default for every user regardless of their saved Account → Preferences setting. Fix: replace data.currency with data.displayCurrency in fetchCurrency. Also add src/context/__tests__/CurrencyContext.test.tsx with 7 test cases: - picks up a non-USD displayCurrency from the preferences endpoint (primary regression guard) - ignores the legacy wrong field name currency (keeps USD default) - keeps USD default when displayCurrency is absent from the response - exposes loading=true while the fetch is in-flight - keeps USD and surfaces an error when the fetch rejects - keeps USD and surfaces an error on a non-OK HTTP status - throws the expected message when used outside CurrencyProvider Closes Disciplr-Org#1491
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
pnpm build (tsc -b && vite build) was failing on main due to 24 TypeScript errors in two files:
Fix
Verification
Fixes #1489