1
0
mirror of https://gitcode.com/gh_mirrors/re/react-native-pushy.git synced 2025-09-18 01:46:12 +08:00
Code Issues 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: '以后再说',