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 { nativeEvent: { progress } } = event;
|
||||
if (progress === 1) {
|
||||
this.setState({
|
||||
viewState: 'IDLE',
|
||||
this.setState((state) => {
|
||||
if (state.viewState === 'LOADING') {
|
||||
return { viewState: 'IDLE' };
|
||||
}
|
||||
return null;
|
||||
});
|
||||
}
|
||||
if (onLoadProgress) {
|
||||
|
|
Loading…
Reference in New Issue