Skip to content

Commit 7494d00

Browse files
committed
Refactor HTTPCookieStorage.loadPersistedCookies
1 parent c5357f3 commit 7494d00

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Foundation/HTTPCookieStorage.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ open class HTTPCookieStorage: NSObject {
9191
guard let cookies = try? PropertyListSerialization.propertyList(from: cookiesData, format: nil) else { return }
9292
let cookies0 = cookies as? [String: [String: Any]] ?? [:]
9393
self.syncQ.sync {
94-
for key in cookies0.keys {
95-
if let cookie = createCookie(cookies0[key]!) {
94+
for (key, value) in cookies0 {
95+
if let cookie = createCookie(value) {
9696
allCookies[key] = cookie
9797
}
9898
}

0 commit comments

Comments
 (0)