Skip to content

Commit 712e7b7

Browse files
author
Pushkar N Kulkarni
authored
Merge pull request #2306 from ikesyo/refactor-loadPersistedCookies
Refactor `HTTPCookieStorage.loadPersistedCookies`
2 parents c5357f3 + 7494d00 commit 712e7b7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Foundation/HTTPCookieStorage.swift

Lines changed: 2 additions & 2 deletions
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)