From 15569e62b20569ca53cec81aaeb939d2eaae548a Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Wed, 8 Jan 2020 10:54:41 -0700 Subject: [PATCH] Prevent crash when the web view load hasn't set up the tap zone constraints. Issue #1564 --- iOS/Article/WebViewController.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/iOS/Article/WebViewController.swift b/iOS/Article/WebViewController.swift index 42148679a..4031978a3 100644 --- a/iOS/Article/WebViewController.swift +++ b/iOS/Article/WebViewController.swift @@ -230,8 +230,8 @@ class WebViewController: UIViewController { if isFullScreenAvailable { AppDefaults.articleFullscreenEnabled = false coordinator.showStatusBar() - topShowBarsViewConstraint.constant = 0 - bottomShowBarsViewConstraint.constant = 0 + topShowBarsViewConstraint?.constant = 0 + bottomShowBarsViewConstraint?.constant = 0 navigationController?.setNavigationBarHidden(false, animated: true) navigationController?.setToolbarHidden(false, animated: true) configureContextMenuInteraction() @@ -242,8 +242,8 @@ class WebViewController: UIViewController { if isFullScreenAvailable { AppDefaults.articleFullscreenEnabled = true coordinator.hideStatusBar() - topShowBarsViewConstraint.constant = -44.0 - bottomShowBarsViewConstraint.constant = 44.0 + topShowBarsViewConstraint?.constant = -44.0 + bottomShowBarsViewConstraint?.constant = 44.0 navigationController?.setNavigationBarHidden(true, animated: true) navigationController?.setToolbarHidden(true, animated: true) configureContextMenuInteraction()