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-20 22:11:11 +01:00
parent fbd45a2ea0
commit be878df097
No known key found for this signature in database
GPG key ID: 2CF824BD810C3BDB
3 changed files with 4 additions and 4 deletions

View file

@ -146,7 +146,7 @@ OSM = {
return args;
}
hash = Qs.parse(hash.substr(i + 1));
hash = Qs.parse(hash.slice(i + 1));
var map = (hash.map || '').split('/'),
zoom = parseInt(map[0], 10),