Check stateListener
This commit is contained in:
parent
80b0401b02
commit
686209d50e
@ -36,7 +36,7 @@ export function simpleUpdate(WrappedComponent) {
|
||||
this.checkUpdate();
|
||||
}
|
||||
componentWillUnmount() {
|
||||
this.stateListener.remove();
|
||||
this.stateListener && this.stateListener.remove();
|
||||
}
|
||||
doUpdate = async (info) => {
|
||||
try {
|
||||
@ -44,7 +44,7 @@ export function simpleUpdate(WrappedComponent) {
|
||||
if (!hash) {
|
||||
return;
|
||||
}
|
||||
this.stateListener.remove();
|
||||
this.stateListener && this.stateListener.remove();
|
||||
Alert.alert('提示', '下载完毕,是否立即更新?', [
|
||||
{
|
||||
text: '以后再说',
|
||||
|
Loading…
Reference in New Issue
Block a user