From d6e5b1612cacf5420f31db9ed5b3d8445fb94802 Mon Sep 17 00:00:00 2001 From: katopz Date: Fri, 10 Jul 2015 15:29:16 +0700 Subject: [PATCH] fixed `fatal error: unexpectedly found nil while unwrapping an Optional value` for currentPage when swipe left for menu at cover page. --- FolioReaderKit/FolioReaderCenter.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FolioReaderKit/FolioReaderCenter.swift b/FolioReaderKit/FolioReaderCenter.swift index 2fc0ce73c..04556748c 100644 --- a/FolioReaderKit/FolioReaderCenter.swift +++ b/FolioReaderKit/FolioReaderCenter.swift @@ -243,12 +243,12 @@ class FolioReaderCenter: UIViewController, UICollectionViewDelegate, UICollectio func container(didExpandLeftPanel sidePanel: FolioReaderSidePanel) { collectionView.scrollEnabled = false - currentPage.webView.scrollView.scrollEnabled = false + currentPage?.webView.scrollView.scrollEnabled = false } func container(didCollapseLeftPanel sidePanel: FolioReaderSidePanel) { collectionView.scrollEnabled = true - currentPage.webView.scrollView.scrollEnabled = true + currentPage?.webView.scrollView.scrollEnabled = true } func container(sidePanel: FolioReaderSidePanel, didSelectRowAtIndexPath indexPath: NSIndexPath, withTocReference reference: FRTocReference) {