fix categories order
All checks were successful
metroline continuous-integration/metroline

This commit is contained in:
Simon Vieille 2022-01-09 22:17:01 +01:00
parent 1cbdca87df
commit 0923a9107c

View file

@ -187,9 +187,18 @@ class NavController extends Controller
usort($items, function ($a, $b) use ($categoriesLabels) {
foreach ($categoriesLabels as $key => $value) {
if ($a['categoryId'] === 'other') {
return -1;
}
if ($b['categoryId'] === 'other') {
return 1;
}
if ($a['categoryId'] === $key) {
return -1;
}
if ($b['categoryId'] === $key) {
return 1;
}