react-native-update 9.1.3 → 9.1.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.
- package/lib/main.ts +3 -1
- package/package.json +1 -1
package/lib/main.ts
CHANGED
|
@@ -322,10 +322,12 @@ function assertHash(hash: string) {
|
|
|
322
322
|
return true;
|
|
323
323
|
}
|
|
324
324
|
|
|
325
|
+
let applyingUpdate = false;
|
|
325
326
|
export function switchVersion(hash: string) {
|
|
326
327
|
assertRelease();
|
|
327
|
-
if (assertHash(hash)) {
|
|
328
|
+
if (assertHash(hash) && !applyingUpdate) {
|
|
328
329
|
logger('switchVersion: ' + hash);
|
|
330
|
+
applyingUpdate = true;
|
|
329
331
|
PushyModule.reloadUpdate({ hash });
|
|
330
332
|
}
|
|
331
333
|
}
|