Skip to content

Commit

Permalink
remove default value of the webview url
Browse files Browse the repository at this point in the history
  • Loading branch information
RyosukeCla committed Oct 23, 2023
1 parent 02e7ad3 commit 7ee1965
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 4 additions & 1 deletion ios/Nativebrik/Classes/component.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ import SafariServices
class ModalComponentViewController: UIViewController {
private var currentModal: NavigationViewControlller? = nil

func presentWebview(url: String) {
func presentWebview(url: String?) {
guard let url = url else {
return
}
guard let urlObj = URL(string: url) else {
return
}
Expand Down
5 changes: 3 additions & 2 deletions ios/Nativebrik/Classes/root.swift
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,9 @@ class ModalRootViewController: UIViewController {
return
}

// when it's webview modal
if page?.data?.kind == PageKind.WEBVIEW_MODAL {
self.modalViewController?.presentWebview(url: page?.data?.webviewUrl ?? "https://nativebrik.com/intl/en/docs/reference/ios")
self.modalViewController?.presentWebview(url: page?.data?.webviewUrl)
return
}

Expand Down Expand Up @@ -197,7 +198,7 @@ class RootView: UIView {

// when it's webview modal
if page?.data?.kind == PageKind.WEBVIEW_MODAL {
self.modalViewController?.presentWebview(url: page?.data?.webviewUrl ?? "https://nativebrik.com/intl/en/docs/reference/ios")
self.modalViewController?.presentWebview(url: page?.data?.webviewUrl)
return
}

Expand Down

0 comments on commit 7ee1965

Please sign in to comment.