Skip to content

Commit 995ff1e

Browse files
author
Sharma Elanthiriayan
committed
Use weak self in logout alert action.
1 parent 0b5e1c1 commit 995ff1e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

WooCommerce/Classes/ViewRelated/Dashboard/Settings/Settings/SettingsViewController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,9 +251,9 @@ private extension SettingsViewController {
251251
ServiceLocator.analytics.track(.settingsLogoutConfirmation, withProperties: ["result": "negative"])
252252
}
253253

254-
alertController.addDefaultActionWithTitle(Localization.LogoutAlert.logoutButtonTitle) { _ in
254+
alertController.addDefaultActionWithTitle(Localization.LogoutAlert.logoutButtonTitle) { [weak self] _ in
255255
ServiceLocator.analytics.track(.settingsLogoutConfirmation, withProperties: ["result": "positive"])
256-
self.logOutUser()
256+
self?.logOutUser()
257257
}
258258

259259
present(alertController, animated: true)

0 commit comments

Comments
 (0)