Skip to content

Conversation

@zehata
Copy link
Contributor

@zehata zehata commented Dec 30, 2025

Skips loading entirely when the share string is empty

Context

This is a patch to resolve #4275

Implementation

  • The bug occurs because the loading flag is set true by default and if the imported module length is empty it early returns without setting the loading flag to false
  • Since the loading flag is true by default, I also removed the unnecessary setLoading(true)
  • Added tests to ensure that the page loads when the share string is empty

Skips loading entirely when the share string is empty
@vercel
Copy link

vercel bot commented Dec 30, 2025

@zehata is attempting to deploy a commit to the modsbot's projects Team on Vercel.

A member of the Team first needs to authorize it.

@codecov
Copy link

codecov bot commented Dec 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.58%. Comparing base (988c6fd) to head (c7ec0e3).
⚠️ Report is 156 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4276      +/-   ##
==========================================
+ Coverage   54.52%   56.58%   +2.05%     
==========================================
  Files         274      297      +23     
  Lines        6076     6924     +848     
  Branches     1455     1671     +216     
==========================================
+ Hits         3313     3918     +605     
- Misses       2763     3006     +243     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vercel
Copy link

vercel bot commented Jan 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
nusmods-export Ready Ready Preview, Comment Jan 1, 2026 6:14am
nusmods-website Ready Ready Preview, Comment Jan 1, 2026 6:14am

Copy link
Member

@leslieyip02 leslieyip02 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@leslieyip02 leslieyip02 merged commit 7b58137 into nusmodifications:master Jan 1, 2026
6 checks passed
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.

Empty shared timetable string does not load

2 participants