forked from vergnet/application-amicale
Fixed webview crash on refresh after screen rotation
This commit is contained in:
parent
32069f2b8c
commit
c048032781
1 changed files with 7 additions and 3 deletions
|
@ -62,19 +62,22 @@ export default class WebViewScreen extends React.Component<Props> {
|
||||||
|
|
||||||
refreshWebview() {
|
refreshWebview() {
|
||||||
for (let view of this.webviewArray) {
|
for (let view of this.webviewArray) {
|
||||||
view.reload();
|
if (view !== null)
|
||||||
|
view.reload();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
goBackWebview() {
|
goBackWebview() {
|
||||||
for (let view of this.webviewArray) {
|
for (let view of this.webviewArray) {
|
||||||
view.goBack();
|
if (view !== null)
|
||||||
|
view.goBack();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
goForwardWebview() {
|
goForwardWebview() {
|
||||||
for (let view of this.webviewArray) {
|
for (let view of this.webviewArray) {
|
||||||
view.goForward();
|
if (view !== null)
|
||||||
|
view.goForward();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -132,6 +135,7 @@ export default class WebViewScreen extends React.Component<Props> {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const nav = this.props.navigation;
|
const nav = this.props.navigation;
|
||||||
|
this.webviewArray = [];
|
||||||
return (
|
return (
|
||||||
<BaseContainer
|
<BaseContainer
|
||||||
navigation={nav}
|
navigation={nav}
|
||||||
|
|
Loading…
Reference in a new issue