mirror of
https://gitcode.com/gh_mirrors/re/react-native-pushy.git
synced 2025-09-18 01:46:12 +08:00
Check stateListener
This commit is contained in:
@@ -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: '以后再说',
|
||||
|
Reference in New Issue
Block a user