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

Updated route.ts #459

Closed
wants to merge 2 commits into from
Closed

Updated route.ts #459

wants to merge 2 commits into from

Conversation

krishnendu-2003
Copy link
Contributor

Problem

I have made all the necessary changes as was supposed to be made as per the contribution ts/js code.

Summary of Changes

  1. Wrapped the main logic inside try/catch to make sure consistent error handling.
  2. Removed throw with throw new Error() for better consistency in error messages.
  3. Removed @ts-ignore
  4. Redefined the logic for next and prev navigation items with slice() and find() for better and efficient navigation
  5. Strengthened type safety by adding more checks to avoid potential null or undefined issues, ensuring smoother runtime operations.

Fixes #

  1. Updated the error handling logic as needed to work with Error instances rather than error strings.
  2. Adjusted the code to handle null and undefined values as per the new type safety rules.

@nickfrosty nickfrosty requested review from mikemaccana and removed request for nickfrosty September 11, 2024 13:43
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.

1 participant