From efca583cf55b692d9ea9d9895f1b356ce3c276ad Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Thu, 19 Aug 2021 10:22:44 +0200 Subject: [PATCH] refactor: SyncUpdateExtension null safe --- lib/src/utils/sync_update_extension.dart | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/src/utils/sync_update_extension.dart b/lib/src/utils/sync_update_extension.dart index e0839aac..82dfb428 100644 --- a/lib/src/utils/sync_update_extension.dart +++ b/lib/src/utils/sync_update_extension.dart @@ -1,4 +1,3 @@ -// @dart=2.9 /* * Famedly Matrix SDK * Copyright (C) 2020, 2021 Famedly GmbH @@ -41,5 +40,5 @@ extension SyncUpdateFilters on SyncUpdate { } /// Returns if this sync update has presence updates - bool get hasPresenceUpdate => presence != null && presence.isNotEmpty; + bool get hasPresenceUpdate => presence?.isNotEmpty ?? false; }