Skip to content

Commit

Permalink
Merge pull request #561 from nh7a/first_index
Browse files Browse the repository at this point in the history
Update SQLiteNormalizedCache for Swift 5
  • Loading branch information
designatednerd authored Jun 25, 2019
2 parents 211f6d6 + 8417e82 commit 3bb654a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/ApolloSQLite/SQLiteNormalizedCache.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public final class SQLiteNormalizedCache: NormalizedCache {
return Promise {
let records = try selectRecords(forKeys: keys)
let recordsOrNil: [Record?] = keys.map { key in
if let recordIndex = records.index(where: { $0.key == key }) {
if let recordIndex = records.firstIndex(where: { $0.key == key }) {
return records[recordIndex]
}
return nil
Expand Down

0 comments on commit 3bb654a

Please sign in to comment.