Skip to content

Commit 8fa54f7

Browse files
authored
Merge pull request #6157 from woocommerce/issue/6154-ipp-retention
[Mobile Payments] Weak self for IPPVC root view closures please
2 parents 2711e27 + a641108 commit 8fa54f7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

WooCommerce/Classes/ViewRelated/Dashboard/Settings/In-Person Payments/InPersonPaymentsViewController.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ import SwiftUI
33
final class InPersonPaymentsViewController: UIHostingController<InPersonPaymentsView> {
44
init(viewModel: InPersonPaymentsViewModel) {
55
super.init(rootView: InPersonPaymentsView(viewModel: viewModel))
6-
rootView.showSupport = {
6+
rootView.showSupport = { [weak self] in
7+
guard let self = self else { return }
78
ZendeskProvider.shared.showNewWCPayRequestIfPossible(from: self)
89
}
9-
rootView.showURL = { url in
10+
rootView.showURL = { [weak self] url in
11+
guard let self = self else { return }
1012
WebviewHelper.launch(url, with: self)
1113
}
1214
}

0 commit comments

Comments
 (0)