diff --git a/PadelClubData/Data/DataStore.swift b/PadelClubData/Data/DataStore.swift index 44afbac..97fa7d8 100644 --- a/PadelClubData/Data/DataStore.swift +++ b/PadelClubData/Data/DataStore.swift @@ -98,9 +98,9 @@ public class DataStore: ObservableObject { if let userSingleton: StoredCollection = notification.object as? StoredCollection { self.user = userSingleton.first ?? self._temporaryLocalUser.item ?? CustomUser.placeHolder() - } else if let clubsCollection: StoredCollection = notification.object as? StoredCollection { + } else if notification.object is StoredCollection { self._fixMissingClubCreatorIfNecessary() - } else if let eventsCollection: StoredCollection = notification.object as? StoredCollection { + } else if notification.object is StoredCollection { self._fixMissingEventCreatorIfNecessary() }