Replaced the deprecated JavaScript String.substr with String.substring.
This commit is contained in:
parent
1c44d51e92
commit
3792524022
@ -75,7 +75,7 @@ function updateParent(code) {
|
||||
parent.text(gettext("Topmost"));
|
||||
return;
|
||||
}
|
||||
const parentCode = code.value.substr(0, code.value.length - 1);
|
||||
const parentCode = code.value.substring(0, code.value.length - 1);
|
||||
if (parentCode in accounts) {
|
||||
parent.text(parentCode + " " + accounts[parentCode]);
|
||||
return;
|
||||
@ -136,7 +136,7 @@ function validateCode() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
const parentCode = code.value.substr(0, code.value.length - 1);
|
||||
const parentCode = code.value.substring(0, code.value.length - 1);
|
||||
if (!(parentCode in accounts)) {
|
||||
code.classList.add("is-invalid");
|
||||
errorMessage.text(gettext("The parent account of this code does not exist."));
|
||||
|
@ -298,7 +298,7 @@ function parseSummaryForHelper(summary) {
|
||||
const pos = summary.lastIndexOf("×");
|
||||
let count = 1;
|
||||
if (pos !== -1) {
|
||||
count = parseInt(summary.substr(pos + 1));
|
||||
count = parseInt(summary.substring(pos + 1));
|
||||
}
|
||||
if (count === 0) {
|
||||
count = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user