1
0
Code Issues Pull Requests 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
No known key found for this signature in database

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 });
}
}