From d9fd0860029b26b769fb895140dccf54a8e00bcf Mon Sep 17 00:00:00 2001 From: Tobias Speicher Date: Thu, 17 Mar 2022 23:52:22 +0100 Subject: [PATCH] chore: replace deprecated String.prototype.substr() .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 {