From 3e583a6b391e895142ed2b80f457b0a14a57fa61 Mon Sep 17 00:00:00 2001 From: Arnaud Vergnet Date: Tue, 14 Apr 2020 11:56:12 +0200 Subject: [PATCH] Fixed crash on webview method calls --- src/components/Screens/WebViewScreen.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/Screens/WebViewScreen.js b/src/components/Screens/WebViewScreen.js index 4e99d73..2d53cc5 100644 --- a/src/components/Screens/WebViewScreen.js +++ b/src/components/Screens/WebViewScreen.js @@ -105,9 +105,9 @@ class WebViewScreen extends React.PureComponent { /** * Callback to use when refresh button is clicked. Reloads the webview. */ - onRefreshClicked = () => this.webviewRef.current.reload(); - onGoBackClicked = () => this.webviewRef.current.goBack(); - onGoForwardClicked = () => this.webviewRef.current.goForward(); + onRefreshClicked = () => this.webviewRef.current.getNode().reload(); // Need to call getNode() as we are working with animated components + onGoBackClicked = () => this.webviewRef.current.getNode().goBack(); + onGoForwardClicked = () => this.webviewRef.current.getNode().goForward(); onOpenClicked = () => Linking.openURL(this.props.url);