1
0
mirror of https://gitcode.com/gh_mirrors/re/react-native-pushy.git synced 2025-09-16 10:41:38 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee

chore: throttle switchversion

This commit is contained in:
sunnylqm
2023-10-30 22:58:09 +08:00
parent 33eb89d2a7
commit 7752581470

View File

@@ -322,10 +322,12 @@ function assertHash(hash: string) {
return true;
}
let applyingUpdate = false;
export function switchVersion(hash: string) {
assertRelease();
if (assertHash(hash)) {
if (assertHash(hash) && !applyingUpdate) {
logger('switchVersion: ' + hash);
applyingUpdate = true;
PushyModule.reloadUpdate({ hash });
}
}