Skip to content

Commit

Permalink
v10.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnylqm committed Apr 18, 2024
1 parent 571c281 commit d1ecfb3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-update",
"version": "10.4.0",
"version": "10.4.1",
"description": "react-native hot update",
"main": "src/index.ts",
"scripts": {
Expand Down
7 changes: 7 additions & 0 deletions src/client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export class Pushy {
useAlert: true,
strategy: 'both',
logger: noop,
debug: false,
};

lastChecking?: number;
Expand Down Expand Up @@ -146,6 +147,12 @@ export class Pushy {
}
};
checkUpdate = async () => {
if (__DEV__ && !this.options.debug) {
console.info(
'您当前处于开发环境且未启用debug,不会进行热更检查。如需在开发环境中调试热更,请在client中设置debug为true',
);
return;
}
const now = Date.now();
if (
this.lastRespJson &&
Expand Down
1 change: 1 addition & 0 deletions src/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,5 @@ export interface PushyOptions {
strategy?: 'onAppStart' | 'onAppResume' | 'both' | null;
autoMarkSuccess?: boolean;
dismissErrorAfter?: number;
debug?: boolean;
}

0 comments on commit d1ecfb3

Please sign in to comment.