From 8417e82304ca23507ddc0227fc12d22f61c69b13 Mon Sep 17 00:00:00 2001 From: Naoki Hiroshima Date: Fri, 31 May 2019 09:43:23 -0700 Subject: [PATCH] Replace deprecated index(of:) with firstIndex(of:). --- Sources/ApolloSQLite/SQLiteNormalizedCache.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/ApolloSQLite/SQLiteNormalizedCache.swift b/Sources/ApolloSQLite/SQLiteNormalizedCache.swift index e66d438f3d..72fedb7de0 100644 --- a/Sources/ApolloSQLite/SQLiteNormalizedCache.swift +++ b/Sources/ApolloSQLite/SQLiteNormalizedCache.swift @@ -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