Skip to content

Commit

Permalink
chore: replace deprecated String.prototype.substr() (#571)
Browse files Browse the repository at this point in the history
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated
Signed-off-by: Tobias Speicher <[email protected]>
  • Loading branch information
CommanderRoot authored Mar 18, 2022
1 parent 63e96cb commit c251afd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/helpers/readAsset.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default (asset, compiler, stats) => {
const queryStringIdx = targetFile.indexOf("?");

if (queryStringIdx >= 0) {
targetFile = targetFile.substr(0, queryStringIdx);
targetFile = targetFile.slice(0, queryStringIdx);
}

try {
Expand Down

0 comments on commit c251afd

Please sign in to comment.