[Part 3] Small copy error
goliatone opened this issue · comments
Looking at one of the snippets in the 3rd blog post:
class AuthenticationService: ObservableObject {
// ...
func updateDisplayName(displayName: String) { // (2)
if let user = Auth.auth().currentUser {
let changeRequest = user.createProfileChangeRequest() // (3)
changeRequest.displayName = displayName
changeRequest.commitChanges { error in // (4)
if error != nil {
print("Successfully updated display name for user [\(user.uid)] to [\(displayName)]")
}
}
}
}
}
I think this is a typo? Should be error == nil
:
if error != nil {
print("Successfully updated display name for user [\(user.uid)] to [\(displayName)]")