Skip to content

Commit

Permalink
moved configureLoadScripts() call into loadUrl()
Browse files Browse the repository at this point in the history
this ensures that the load scripts are injected before the WKWebView loads the URL
  • Loading branch information
ab1470 committed Jan 22, 2025
1 parent eb62d74 commit 044ae38
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ class KlaviyoWebViewController: UIViewController, WKUIDelegate, KlaviyoWebViewDe
view = UIView()
view.addSubview(webView)

configureLoadScripts()
configureSubviewConstraints()
}

Expand All @@ -72,6 +71,7 @@ class KlaviyoWebViewController: UIViewController, WKUIDelegate, KlaviyoWebViewDe

@MainActor
private func loadUrl() {
configureLoadScripts()
let request = URLRequest(url: viewModel.url)
webView.load(request)
}
Expand Down

0 comments on commit 044ae38

Please sign in to comment.