Set consecutive keys for dashboard items array. Fix JS error when printing imported dashboard

This commit is contained in:
Enrique Martin 2024-02-13 11:53:35 +01:00
parent 57b50e4c85
commit 9733ac8717
1 changed files with 2 additions and 2 deletions

View File

@ -1229,7 +1229,7 @@ class Manager implements PublicLogin
}
if (empty($cells) === false) {
$result = array_reduce(
$result = array_values(array_reduce(
$cells,
function ($carry, $item) {
$carry[$item['order']]['id'] = $item['id'];
@ -1239,7 +1239,7 @@ class Manager implements PublicLogin
return $carry;
},
[]
);
));
}
echo json_encode($result);