Skip to content

Commit 4d8e043

Browse files
chore: replace deprecated String.prototype.substr() (webpack-contrib#921)
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
1 parent 3fd5e5e commit 4d8e043

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)