1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
sunnylqm 2024-07-31 18:06:05 +08:00
parent ab01b6010a
commit 5e89fb4a25
No known key found for this signature in database
2 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "react-native-update", "name": "react-native-update",
"version": "10.11.3", "version": "10.11.4",
"description": "react-native hot update", "description": "react-native hot update",
"main": "src/index", "main": "src/index",
"scripts": { "scripts": {

View File

@ -147,7 +147,7 @@ export const PushyProvider = ({
); );
const checkUpdate = useCallback( const checkUpdate = useCallback(
async (extra?: Record<string, any>) => { async ({ extra }: { extra?: Record<string, any> } | undefined = {}) => {
const now = Date.now(); const now = Date.now();
if (lastChecking.current && now - lastChecking.current < 1000) { if (lastChecking.current && now - lastChecking.current < 1000) {
return; return;
@ -272,7 +272,7 @@ export const PushyProvider = ({
Alert.alert(type, JSON.stringify(data)); Alert.alert(type, JSON.stringify(data));
}; };
if (payload.type === '__rnPushyVersionHash') { if (payload.type === '__rnPushyVersionHash') {
checkUpdate({ toHash: payload.data }).then(() => { checkUpdate({ extra: { toHash: payload.data } }).then(() => {
if (updateInfoRef.current && updateInfoRef.current.upToDate) { if (updateInfoRef.current && updateInfoRef.current.upToDate) {
Alert.alert( Alert.alert(
'提示', '提示',