1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee

Check stateListener

This commit is contained in:
sunnylqm 2021-11-10 22:31:23 +08:00
parent 80b0401b02
commit 686209d50e

View File

@ -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: '以后再说',