Skip to content

Commit

Permalink
v10.5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnylqm committed Apr 23, 2024
1 parent 9fd6293 commit 6244bb9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Example/testHotUpdate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"react-native": "0.69.8",
"react-native-paper": "^5.12.1",
"react-native-safe-area-context": "^4.8.2",
"react-native-update": "^10.2.6",
"react-native-update": "^10.5.3",
"react-native-vector-icons": "^10.0.3"
},
"devDependencies": {
Expand Down
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.5.3",
"version": "10.5.4",
"description": "react-native hot update",
"main": "src/index",
"scripts": {
Expand Down
6 changes: 4 additions & 2 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@ export class Pushy {
version = cInfo.pushy;

constructor(options: PushyOptions) {
if (!options.appKey) {
throw new Error('appKey is required');
if (Platform.OS === 'ios' || Platform.OS === 'android') {
if (!options.appKey) {
throw new Error('appKey is required');
}
}
this.setOptions(options);
}
Expand Down
3 changes: 3 additions & 0 deletions src/provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ export const PushyProvider = ({
showAlert('更新检查失败', e.message);
return;
}
if (!info) {
return;
}
updateInfoRef.current = info;
setUpdateInfo(info);
if (info.expired) {
Expand Down

0 comments on commit 6244bb9

Please sign in to comment.