[PR #2187] [MERGED] refactor: replace deprecated String.prototype.substr() #3663

Closed
opened 2026-03-17 01:15:29 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/2187
Author: @CommanderRoot
Created: 3/22/2022
Status: Merged
Merged: 3/23/2022
Merged by: @AndrewBastin

Base: mainHead: refactor/rm-deprecated-substr


📝 Commits (1)

  • 0602ed5 refactor: replace deprecated String.prototype.substr()

📊 Changes

2 files changed (+2 additions, -2 deletions)

View changed files

📝 packages/hoppscotch-app/components/profile/Picture.vue (+1 -1)
📝 packages/hoppscotch-app/helpers/oauth.js (+1 -1)

📄 Description

Description

String.prototype.substr() is deprecated so we replace it with String.prototype.slice() which works similarily but isn't deprecated.
.substr() probably isn't going away anytime soon but the change is trivial so it doesn't hurt to do it.

Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

Additional Information


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/2187 **Author:** [@CommanderRoot](https://github.com/CommanderRoot) **Created:** 3/22/2022 **Status:** ✅ Merged **Merged:** 3/23/2022 **Merged by:** [@AndrewBastin](https://github.com/AndrewBastin) **Base:** `main` ← **Head:** `refactor/rm-deprecated-substr` --- ### 📝 Commits (1) - [`0602ed5`](https://github.com/hoppscotch/hoppscotch/commit/0602ed55dd07426e1b251d267b240584ac677299) refactor: replace deprecated String.prototype.substr() ### 📊 Changes **2 files changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-app/components/profile/Picture.vue` (+1 -1) 📝 `packages/hoppscotch-app/helpers/oauth.js` (+1 -1) </details> ### 📄 Description ### Description [String.prototype.substr()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substr) is deprecated so we replace it with [String.prototype.slice()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice) which works similarily but isn't deprecated. .substr() probably isn't going away anytime soon but the change is trivial so it doesn't hurt to do it. <!-- You can also choose to add a list of changes and if they have been completed or not by using the markdown to-do list syntax - [ ] Not Completed - [x] Completed --> ### Checks <!-- Make sure your pull request passes the CI checks and do check the following fields as needed - --> - [x] My pull request adheres to the code style of this project - [ ] My code requires changes to the documentation - [ ] I have updated the documentation as required - [x] All the tests have passed ### Additional Information --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 01:15:29 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#3663
No description provided.