Skip to content

Commit

Permalink
chore: replace deprecated String.prototype.substr() (#82)
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 <rootcommander@gmail.com>
  • Loading branch information
CommanderRoot committed Mar 18, 2022
1 parent 04e4f0f commit 8cfd7e7
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 8cfd7e7

Please sign in to comment.