mirror of
				https://gitcode.com/gh_mirrors/re/react-native-pushy.git
				synced 2025-11-04 15:23:11 +08:00 
			
		
		
		
	v10.11.4
This commit is contained in:
		@@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "react-native-update",
 | 
			
		||||
  "version": "10.11.3",
 | 
			
		||||
  "version": "10.11.4",
 | 
			
		||||
  "description": "react-native hot update",
 | 
			
		||||
  "main": "src/index",
 | 
			
		||||
  "scripts": {
 | 
			
		||||
 
 | 
			
		||||
@@ -147,7 +147,7 @@ export const PushyProvider = ({
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
  const checkUpdate = useCallback(
 | 
			
		||||
    async (extra?: Record<string, any>) => {
 | 
			
		||||
    async ({ extra }: { extra?: Record<string, any> } | undefined = {}) => {
 | 
			
		||||
      const now = Date.now();
 | 
			
		||||
      if (lastChecking.current && now - lastChecking.current < 1000) {
 | 
			
		||||
        return;
 | 
			
		||||
@@ -272,7 +272,7 @@ export const PushyProvider = ({
 | 
			
		||||
          Alert.alert(type, JSON.stringify(data));
 | 
			
		||||
        };
 | 
			
		||||
        if (payload.type === '__rnPushyVersionHash') {
 | 
			
		||||
          checkUpdate({ toHash: payload.data }).then(() => {
 | 
			
		||||
          checkUpdate({ extra: { toHash: payload.data } }).then(() => {
 | 
			
		||||
            if (updateInfoRef.current && updateInfoRef.current.upToDate) {
 | 
			
		||||
              Alert.alert(
 | 
			
		||||
                '提示',
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user