v10.11.4
This commit is contained in:
parent
ab01b6010a
commit
5e89fb4a25
@ -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": {
|
||||||
|
@ -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(
|
||||||
'提示',
|
'提示',
|
||||||
|
Loading…
Reference in New Issue
Block a user