From c251afd23ccdba83d31c2085bcd07e2afc434f3b Mon Sep 17 00:00:00 2001 From: CommanderRoot Date: Fri, 18 Mar 2022 02:17:23 +0100 Subject: [PATCH] chore: replace deprecated String.prototype.substr() (#571) .substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated Signed-off-by: Tobias Speicher --- test/helpers/readAsset.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/helpers/readAsset.js b/test/helpers/readAsset.js index fde3ff39..bd1ae276 100644 --- a/test/helpers/readAsset.js +++ b/test/helpers/readAsset.js @@ -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 {