Skip to content
This repository was archived by the owner on Sep 15, 2025. It is now read-only.

Commit bbaf2dc

Browse files
committed
Move twoStepEnabled unwraping inside guard
1 parent 474ea9c commit bbaf2dc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

WordPressKit/AccountSettingsRemote.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,12 @@ public class AccountSettingsRemote: ServiceRemoteWordPressComREST {
171171
let webAddress = response["user_URL"] as? String,
172172
let language = response["language"] as? String,
173173
let tracksOptOut = response["tracks_opt_out"] as? Bool,
174-
let blockEmailNotifications = response["subscription_delivery_email_blocked"] as? Bool
174+
let blockEmailNotifications = response["subscription_delivery_email_blocked"] as? Bool,
175+
let twoStepEnabled = response["two_step_enabled"] as? Bool
175176
else {
176177
WPKitLogError("Error decoding me/settings response: \(responseObject)")
177178
throw ResponseError.decodingFailure
178179
}
179-
let twoStepEnabled = response["two_step_enabled"] as? Bool ?? false
180180

181181
let aboutMeText = aboutMe.decodingXMLCharacters()
182182

0 commit comments

Comments
 (0)