mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Don't force cast scrollY as it might not always be set. Issue #1685
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user