fix(android): renderError - the error status might be overwritte… (#915)
This commit is contained in:
parent
f958f8a493
commit
01de9e5fa0
|
@ -218,8 +218,11 @@ class WebView extends React.Component<AndroidWebViewProps, State> {
|
||||||
const { onLoadProgress } = this.props;
|
const { onLoadProgress } = this.props;
|
||||||
const { nativeEvent: { progress } } = event;
|
const { nativeEvent: { progress } } = event;
|
||||||
if (progress === 1) {
|
if (progress === 1) {
|
||||||
this.setState({
|
this.setState((state) => {
|
||||||
viewState: 'IDLE',
|
if (state.viewState === 'LOADING') {
|
||||||
|
return { viewState: 'IDLE' };
|
||||||
|
}
|
||||||
|
return null;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (onLoadProgress) {
|
if (onLoadProgress) {
|
||||||
|
|
Loading…
Reference in New Issue