Skip to content

Commit

Permalink
chore: replace deprecated String.prototype.substr()
Browse files Browse the repository at this point in the history
String.prototype.substr() is deprecated (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substr) 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 17, 2022
1 parent 861834c commit 84f6f87
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 84f6f87

Please sign in to comment.