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

Replace deprecated String.prototype.substr() #119

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Replace deprecated String.prototype.substr()
.substr() is deprecated so we replace it with functions which work similarily but aren't deprecated

Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
  • Loading branch information
CommanderRoot committed Apr 5, 2022
commit 61b9dac0296b941696b7ca4a5c21ceb5c86857ea
2 changes: 1 addition & 1 deletion src/components/__tests__/FontAwesomeIcon.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function rgbToHex(r, g, b) {
}

function decimalToHex(decimal) {
return decimal.toString(16).substr(2, 6);
return decimal.toString(16).slice(2, 8);
}

// react-native-svg changed the way it uses the `fill` attribute across versions. Older versions
Expand Down