Merged
Conversation
*Changed the link code so that it falls back to the most recent administration year *Fixed the circular dependency by removing the toLocalUrl function and building the image path directly inline
jbriones1
requested changes
Feb 3, 2026
*Changed the link code so that it finds the most recent admin year and throws an error if it fails to find an administration.
*Removed the toLocalUrl function and built the image path directly inline.
jbriones1
approved these changes
Feb 5, 2026
Collaborator
jbriones1
left a comment
There was a problem hiding this comment.
Looks good to me! I'll go ahead and squash these changes into main.
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.
closes #235
Description:
On the Officers page, the app was crashing with "Administration for year 2026 not found" error, preventing the page from rendering. Additionally, external links were not displaying, and executive member photos were failing to load.
Root cause:
The currentAdministration computed property was hardcoded to look for executive administration data matching the current year (2026). Since the 2026 administration data doesn't exist yet in the codebase, the code threw an error instead of gracefully handling the missing data. Additionally, the toLocalUrl() method was looking for images in the executives/2026/ folder when they were actually in executives/2025/.
Fix:
Added fallback logic to use the most recent available administration when the current year's data doesn't exist. The code now uses .reduce() to find the administration with the highest startYear and displays that instead of crashing. Also built the image path inline using the actual administration's startYear instead of calling toLocalUrl(), ensuring images load from the correct year's folder (e.g., executives/2025/ when showing 2025 administration).
(optional) Future issues:
When 2026 executive data is added to the codebase, we can create the public/images/executives/2026/ folder with the corresponding photos. The TODO comment mentions this should eventually fetch from the backend, which would eliminate the need for manual updates.