Skip to content

Conversation

@Sam-61s
Copy link
Contributor

@Sam-61s Sam-61s commented Dec 31, 2025

What kind of change does this PR introduce?

  • Bug fix / Refactoring

Issue Number:

Screenshots/videos:

  • Not applicable (no UI changes)

If relevant, did you update the documentation?

  • Not required

Summary
This PR replaces usages of the deprecated String.prototype.substr API with standard and well-supported alternatives (slice or substring) in the affected areas.

The deprecated usage was causing ESLint/editor warnings. The changes preserve existing behavior and logic while aligning with modern JavaScript best practices.

Note on failing test
There is a pre-existing test failure in JsonEditor.cy.tsx for the router navigation test
(should navigate correctly to each type-keyword reference page when clicked on type-keyword).

This failure exists on the base branch and is unrelated to this change.
It was verified by stashing these changes and running the tests on the base branch, where the failure still occurs.

Does this PR introduce a breaking change?

  • No

Checklist

  • Read, understood, and followed the contributing guidelines

@Sam-61s Sam-61s requested a review from a team as a code owner December 31, 2025 08:51
@github-project-automation github-project-automation bot moved this to Ready to review in PR - Triage Group Dec 31, 2025
@github-actions
Copy link

github-actions bot commented Dec 31, 2025

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
website ✅ Ready (View Log) Visit Preview 70588e6

@Sam-61s
Copy link
Contributor Author

Sam-61s commented Dec 31, 2025

@Utkarsh-123github
The failing JsonEditor.cy.tsx router navigation test is pre-existing on the base branch and unrelated to this change.
This PR replaces deprecated String.prototype.substr usage while preserving existing behavior.
Details are noted in the PR description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Ready to review

Development

Successfully merging this pull request may close these issues.

🐛 Bug: Replace deprecated String.substr usages with slice

1 participant