Počty stavů musíme inicializovat na nulu, jinak se nezmění
This commit is contained in:
parent
1624fdecc2
commit
136aca5b83
1 changed files with 2 additions and 1 deletions
|
@ -58,7 +58,8 @@ Zobrazit:
|
|||
|
||||
function updatuj_pocty_stavu() {
|
||||
const pocty_stavu = {};
|
||||
for (let oprava of Object.values(opravy)) {
|
||||
for (const stav of Object.keys(spany_s_pocty_stavu)) pocty_stavu[stav] = 0;
|
||||
for (const oprava of Object.values(opravy)) {
|
||||
if (!(oprava.status in pocty_stavu)) pocty_stavu[oprava.status] = 0;
|
||||
pocty_stavu[oprava.status] += 1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue