Skip to content

Commit 349101b

Browse files
committed
Fix right slide back Crash
1 parent 3a5d0f1 commit 349101b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ruby-china-ios/Controllers/WebViewController.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,9 @@ class WebViewController: VisitableViewController {
112112
}
113113

114114
override func visitableDidRender() {
115-
router.match(NSURL(string: (self.visitableView?.webView?.URL?.path)!)!)
115+
if let urlPath = self.visitableView?.webView?.URL?.path, url = NSURL(string: urlPath) {
116+
router.match(url)
117+
}
116118
// 覆盖 visitableDidRender,避免设置 title
117119
navigationController?.topViewController?.title = pageTitle
118120
}

0 commit comments

Comments
 (0)