diff --git a/android/proguard.pro b/android/proguard.pro index 4563039..cb61f06 100644 --- a/android/proguard.pro +++ b/android/proguard.pro @@ -1,2 +1,3 @@ -keepnames class cn.reactnative.modules.update.DownloadTask { *; } +-keepnames class cn.reactnative.modules.update.UpdateModuleImpl { *; } -keepnames class com.facebook.react.ReactInstanceManager { *; } \ No newline at end of file diff --git a/lib/main.ts b/lib/main.ts index 9a07135..5d0fd46 100644 --- a/lib/main.ts +++ b/lib/main.ts @@ -139,7 +139,7 @@ export async function checkUpdate(APPKEY: string, isRetry?: boolean) { const now = Date.now(); if (lastResult && lastChecking && now - lastChecking < 1000 * 60) { // logger('repeated checking, ignored'); - return lastResult || empty; + return lastResult; } lastChecking = now; if (blockUpdate && blockUpdate.until > Date.now() / 1000) { @@ -190,7 +190,6 @@ export async function checkUpdate(APPKEY: string, isRetry?: boolean) { //@ts-ignore message: result.message, }); - return lastResult; } return result; diff --git a/package.json b/package.json index 2daeaae..27843e8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-update", - "version": "9.0.4", + "version": "9.0.5", "description": "react-native hot update", "main": "lib/index.ts", "scripts": {