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

Commit 66d84dc

Browse files
Merge pull request #20 from wordpress-mobile/issue/ios-12-fixing-crash
iOS 12 Beta 6: Fixing Autofill Crash
2 parents 5c758ab + 0363ea7 commit 66d84dc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

WordPressAuthenticator/Signin/Login2FAViewController.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ class Login2FAViewController: LoginViewController, NUXKeyboardResponder, UITextF
193193

194194
// because the string was stripped of whitespace, we can't return true and we update the textfield ourselves
195195
textField.text = cleanedCode
196-
handleTextFieldDidChange()
196+
handleTextFieldDidChange(textField)
197197
case .invalid(nonNumbers: true):
198198
displayError(message: NSLocalizedString("A verification code will only contain numbers.", comment: "Shown when a user types a non-number into the two factor field."))
199199
default:
@@ -231,7 +231,7 @@ class Login2FAViewController: LoginViewController, NUXKeyboardResponder, UITextF
231231
return false
232232
}
233233

234-
func handleTextFieldDidChange() {
234+
@IBAction func handleTextFieldDidChange(_ sender: UITextField) {
235235
loginFields.multifactorCode = verificationCodeField.nonNilTrimmedText()
236236
configureSubmitButton(animating: false)
237237
}
@@ -283,7 +283,7 @@ class Login2FAViewController: LoginViewController, NUXKeyboardResponder, UITextF
283283
case .valid(let cleanedCode):
284284
displayError(message: "")
285285
verificationCodeField.text = cleanedCode
286-
handleTextFieldDidChange()
286+
handleTextFieldDidChange(verificationCodeField)
287287
default:
288288
break
289289
}

0 commit comments

Comments
 (0)