diff --git a/Core/Core/View/Base/LogistrationBottomView.swift b/Core/Core/View/Base/LogistrationBottomView.swift index d5da22cc..c902a1b4 100644 --- a/Core/Core/View/Base/LogistrationBottomView.swift +++ b/Core/Core/View/Base/LogistrationBottomView.swift @@ -15,6 +15,10 @@ public enum LogistrationSourceScreen: Equatable, Sendable { case discovery case courseDetail(String, String) case programDetails(String) + + public var value: String? { + return String(describing: self).components(separatedBy: "(").first + } } public enum LogistrationAction: Sendable { diff --git a/Discovery/Discovery/Presentation/WebDiscovery/DiscoveryWebviewViewModel.swift b/Discovery/Discovery/Presentation/WebDiscovery/DiscoveryWebviewViewModel.swift index 86e5e96e..1c70dcdf 100644 --- a/Discovery/Discovery/Presentation/WebDiscovery/DiscoveryWebviewViewModel.swift +++ b/Discovery/Discovery/Presentation/WebDiscovery/DiscoveryWebviewViewModel.swift @@ -150,7 +150,7 @@ extension DiscoveryWebviewViewModel: WebViewNavigationDelegate { screen: self?.sourceScreen.value ?? "", action: "cancel" ) - }, okTapped: { + }, okTapped: { [weak self] in UIApplication.shared.open(url, options: [:]) self?.analytics.externalLinkOpenAction( url: url.absoluteString,