fix: missing null check

This commit is contained in:
Sorunome 2021-08-27 16:56:12 +02:00
parent bfb55b4525
commit e3e815ecf0
No known key found for this signature in database
GPG Key ID: B19471D07FC9BE9C

View File

@ -133,7 +133,7 @@ class DevicesSettingsController extends State<DevicesSettings> {
List<Device> get notThisDevice => List<Device>.from(devices)
..removeWhere(_isOwnDevice)
..sort((a, b) => b.lastSeenTs.compareTo(a.lastSeenTs));
..sort((a, b) => (b.lastSeenTs ?? 0).compareTo(a.lastSeenTs ?? 0));
@override
Widget build(BuildContext context) => DevicesSettingsView(this);