chore: throttle switchversion
This commit is contained in:
parent
33eb89d2a7
commit
7752581470
@ -322,10 +322,12 @@ function assertHash(hash: string) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let applyingUpdate = false;
|
||||||
export function switchVersion(hash: string) {
|
export function switchVersion(hash: string) {
|
||||||
assertRelease();
|
assertRelease();
|
||||||
if (assertHash(hash)) {
|
if (assertHash(hash) && !applyingUpdate) {
|
||||||
logger('switchVersion: ' + hash);
|
logger('switchVersion: ' + hash);
|
||||||
|
applyingUpdate = true;
|
||||||
PushyModule.reloadUpdate({ hash });
|
PushyModule.reloadUpdate({ hash });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user