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:
CommanderRoot
2022-06-06 16:16:38 +02:00
committed by GitHub
parent c6a802b177
commit 76738daff8
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -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),