react-native-update 10.35.6 → 10.35.7
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 +10 -3
package/package.json
CHANGED
package/src/provider.tsx
CHANGED
|
@@ -13,7 +13,12 @@ import {
|
|
|
13
13
|
Linking,
|
|
14
14
|
} from 'react-native';
|
|
15
15
|
import { Pushy, Cresc, sharedState } from './client';
|
|
16
|
-
import {
|
|
16
|
+
import {
|
|
17
|
+
currentVersion,
|
|
18
|
+
packageVersion,
|
|
19
|
+
getCurrentVersionInfo,
|
|
20
|
+
currentVersionInfo,
|
|
21
|
+
} from './core';
|
|
17
22
|
import {
|
|
18
23
|
CheckResult,
|
|
19
24
|
ProgressData,
|
|
@@ -165,7 +170,7 @@ export const UpdateProvider = ({
|
|
|
165
170
|
lastChecking.current = now;
|
|
166
171
|
let rootInfo: CheckResult | undefined;
|
|
167
172
|
try {
|
|
168
|
-
rootInfo = await client.checkUpdate(extra);
|
|
173
|
+
rootInfo = { ...(await client.checkUpdate(extra)) };
|
|
169
174
|
} catch (e: any) {
|
|
170
175
|
setLastError(e);
|
|
171
176
|
alertError(client.t('error_update_check_failed'), e.message);
|
|
@@ -175,7 +180,9 @@ export const UpdateProvider = ({
|
|
|
175
180
|
if (!rootInfo) {
|
|
176
181
|
return;
|
|
177
182
|
}
|
|
178
|
-
const versions = [rootInfo.expVersion, rootInfo].filter(
|
|
183
|
+
const versions = [rootInfo.expVersion, rootInfo].filter(
|
|
184
|
+
Boolean,
|
|
185
|
+
) as VersionInfo[];
|
|
179
186
|
delete rootInfo.expVersion;
|
|
180
187
|
for (const versionInfo of versions) {
|
|
181
188
|
const info: CheckResult = {
|