aaronpearce / Harmony

Harmony provides CloudKit sync for GRDB and only GRDB.
Other
142 stars 10 forks source link

Add error for missing modelTypes. #10

Open haIIux opened 4 months ago

haIIux commented 4 months ago

Need to add an error to the function at Line 427 to handle missing model types in the syncable list.

    func modelType(for recordType: String) -> (any HRecord.Type)? {
        guard let modelType = self.modelTypes.first(where: { t in
            return t.recordType == recordType
        }) else {
            // Add error!
            return nil
        }

        return modelType
    }