mirror of
https://github.com/FoggedLens/iD.git
synced 2026-06-01 20:51:36 +02:00
Replace deprecated String.prototype.substr() (#8988)
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:
@@ -434,7 +434,7 @@ export function uiFieldCombo(field, context) {
|
||||
var v = tags[k];
|
||||
if (!v || (typeof v === 'string' && v.toLowerCase() === 'no')) continue;
|
||||
|
||||
var suffix = field.key ? k.substr(field.key.length) : k;
|
||||
var suffix = field.key ? k.slice(field.key.length) : k;
|
||||
_multiData.push({
|
||||
key: k,
|
||||
value: displayValue(suffix),
|
||||
|
||||
Reference in New Issue
Block a user