diff --git a/apple/RNCWebView.m b/apple/RNCWebView.m index 02005db56..17998f890 100644 --- a/apple/RNCWebView.m +++ b/apple/RNCWebView.m @@ -282,7 +282,7 @@ - (void)didMoveToWindow _webView.scrollView.scrollEnabled = _scrollEnabled; _webView.scrollView.pagingEnabled = _pagingEnabled; //For UIRefreshControl to work correctly, the bounces should always be true - _webView.scrollView.bounces = _pullToRefreshEnabled || _bounces; + _webView.scrollView.bounces = _pullToRefreshEnabled || _bounces; _webView.scrollView.showsHorizontalScrollIndicator = _showsHorizontalScrollIndicator; _webView.scrollView.showsVerticalScrollIndicator = _showsVerticalScrollIndicator; _webView.scrollView.directionalLockEnabled = _directionalLockEnabled; @@ -1155,7 +1155,7 @@ - (void)pullToRefresh:(UIRefreshControl *)refreshControl - (void)setPullToRefreshEnabled:(BOOL)pullToRefreshEnabled { _pullToRefreshEnabled = pullToRefreshEnabled; - + if (pullToRefreshEnabled) { [self addPullToRefreshControl]; } else { @@ -1356,7 +1356,7 @@ - (NSURLRequest *)requestForSource:(id)json { if (_sharedCookiesEnabled) { if (@available(iOS 11.0, *)) { // see WKWebView initialization for added cookies - } else { + } else if (request != nil) { NSArray *cookies = [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookiesForURL:request.URL]; NSDictionary *cookieHeader = [NSHTTPCookie requestHeaderFieldsWithCookies:cookies]; NSMutableURLRequest *mutableRequest = [request mutableCopy];