react-native-update 10.11.3 → 10.11.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/provider.tsx +2 -2
package/package.json
CHANGED
package/src/provider.tsx
CHANGED
|
@@ -147,7 +147,7 @@ export const PushyProvider = ({
|
|
|
147
147
|
);
|
|
148
148
|
|
|
149
149
|
const checkUpdate = useCallback(
|
|
150
|
-
async (extra?: Record<string, any>) => {
|
|
150
|
+
async ({ extra }: { extra?: Record<string, any> } | undefined = {}) => {
|
|
151
151
|
const now = Date.now();
|
|
152
152
|
if (lastChecking.current && now - lastChecking.current < 1000) {
|
|
153
153
|
return;
|
|
@@ -272,7 +272,7 @@ export const PushyProvider = ({
|
|
|
272
272
|
Alert.alert(type, JSON.stringify(data));
|
|
273
273
|
};
|
|
274
274
|
if (payload.type === '__rnPushyVersionHash') {
|
|
275
|
-
checkUpdate({ toHash: payload.data }).then(() => {
|
|
275
|
+
checkUpdate({ extra: { toHash: payload.data } }).then(() => {
|
|
276
276
|
if (updateInfoRef.current && updateInfoRef.current.upToDate) {
|
|
277
277
|
Alert.alert(
|
|
278
278
|
'提示',
|