Skip to content

Commit 22c6ef0

Browse files
committed
Simplify nonce check
1 parent 67ec443 commit 22c6ef0

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

Networking/Networking/CookieNonce/CookieNonceAuthenticator.swift

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,7 @@ private extension CookieNonceAuthenticator {
163163
}
164164

165165
func readNonceFromAjaxAction(html: String) -> String? {
166-
guard !html.isEmpty else {
167-
return nil
168-
}
169-
return html
166+
html.isEmpty ? nil : html
170167
}
171168

172169
func buildNonceRequestURL(base: URL) -> URL? {

0 commit comments

Comments
 (0)