mirror of
https://gitcode.com/gh_mirrors/re/react-native-pushy.git
synced 2025-11-02 22:33:11 +08:00
Fix assertHash
This commit is contained in:
15
lib/main.js
15
lib/main.js
@@ -268,20 +268,23 @@ function assertHash(hash) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
readyHash = hash;
|
readyHash = hash;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function switchVersion(hash) {
|
export function switchVersion(hash) {
|
||||||
assertRelease();
|
assertRelease();
|
||||||
assertHash(hash);
|
if (assertHash(hash)) {
|
||||||
logger('switchVersion: ' + hash);
|
logger('switchVersion: ' + hash);
|
||||||
Pushy.reloadUpdate({ hash });
|
Pushy.reloadUpdate({ hash });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function switchVersionLater(hash) {
|
export function switchVersionLater(hash) {
|
||||||
assertRelease();
|
assertRelease();
|
||||||
assertHash(hash);
|
if (assertHash(hash)) {
|
||||||
logger('switchVersionLater: ' + hash);
|
logger('switchVersionLater: ' + hash);
|
||||||
Pushy.setNeedUpdate({ hash });
|
Pushy.setNeedUpdate({ hash });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let marked = false;
|
let marked = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user