diff options
author | CommanderRoot <CommanderRoot@users.noreply.github.com> | 2022-05-03 15:52:45 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-03 15:52:45 +0300 |
commit | 56640ae815fbace78c62482711cb1733d26cee5e (patch) | |
tree | 18078e6b9ec3e8ffe7cc6ac28e4c8f0a309bce94 /plugins/CoreHome/angularjs/common/directives/field-condition.js | |
parent | 34ea7bbfcbc5a79a5c7b675b8cd2134cdda74cbe (diff) |
Replace deprecated String.prototype.substr() (#19111)
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated
Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
Diffstat (limited to 'plugins/CoreHome/angularjs/common/directives/field-condition.js')
-rw-r--r-- | plugins/CoreHome/angularjs/common/directives/field-condition.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/CoreHome/angularjs/common/directives/field-condition.js b/plugins/CoreHome/angularjs/common/directives/field-condition.js index 3ff3116cf0..5c4c33ff8e 100644 --- a/plugins/CoreHome/angularjs/common/directives/field-condition.js +++ b/plugins/CoreHome/angularjs/common/directives/field-condition.js @@ -38,7 +38,7 @@ } else if (element.prop('tagName').toLowerCase() === 'select') { var name = element.val(); if (name.indexOf('string:') === 0) { - return name.substr('string:'.length); + return name.slice('string:'.length); } return name; |