Skip to content

Commit 70e695e

Browse files
committed
chore: replace deprecated String.prototype.substr()
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>
1 parent b956763 commit 70e695e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/helpers/readAsset.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default (asset, compiler, stats) => {
1010
const queryStringIdx = targetFile.indexOf("?");
1111

1212
if (queryStringIdx >= 0) {
13-
targetFile = targetFile.substr(0, queryStringIdx);
13+
targetFile = targetFile.slice(0, queryStringIdx);
1414
}
1515

1616
try {

0 commit comments

Comments
 (0)