Fix globe controller up/down partition bug (#12757)

This commit is contained in:
Jellyfrog
2021-04-17 23:46:54 +02:00
committed by GitHub
parent 2ce294618f
commit e86b4662b3

View File

@@ -75,7 +75,7 @@ class GlobeController extends WidgetController
if ($data['markers'] == 'devices') {
$count = $location->devices->count();
[$devices_down, $devices_up] = $location->devices->partition(function ($device) {
return $device->disabled = 0 && $device->ignore = 0 && $device->status = 0;
return $device->disabled == 0 && $device->ignore == 0 && $device->status == 0;
});
$up = $devices_up->count();
$down_items = $devices_down->map(function ($device) {