Don't force cast scrollY as it might not always be set. Issue #1685
This commit is contained in:
parent
aa94fbeacf
commit
785775801a
|
@ -423,7 +423,7 @@ extension WebViewController: UIScrollViewDelegate {
|
|||
|
||||
@objc func scrollPositionDidChange() {
|
||||
webView?.evaluateJavaScript("window.scrollY") { (scrollY, _) in
|
||||
self.restoreWindowScrollY = scrollY as! Int
|
||||
self.restoreWindowScrollY = scrollY as? Int ?? 0
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue