1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-09-01 02:40:56 +00:00

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>
This commit is contained in:
Tobias Speicher 2022-02-18 09:20:19 +01:00
parent 6a7ac8c194
commit 61a9e80de0
No known key found for this signature in database
GPG key ID: 2CF824BD810C3BDB
7 changed files with 7 additions and 7 deletions

View file

@ -54,7 +54,7 @@ module.exports = merge(common, {
publicPath: '',
map: data => {
if ( data.name.endsWith('.scss') )
data.name = `${data.name.substr(0,data.name.length - 5)}.css`;
data.name = `${data.name.slice(0, -5)}.css`;
return data;
}