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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/provider.tsx +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-update",
3
- "version": "10.11.3",
3
+ "version": "10.11.4",
4
4
  "description": "react-native hot update",
5
5
  "main": "src/index",
6
6
  "scripts": {
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
  '提示',