mirror of
https://github.com/imputnet/cobalt.git
synced 2024-12-28 02:26:10 +00:00
web/server-info: reload the page only if the sitekey actually changed
This commit is contained in:
parent
1833a95027
commit
9c8cb5611f
|
@ -53,14 +53,9 @@ export const getServerInfo = async () => {
|
||||||
origin: currentApiURL(),
|
origin: currentApiURL(),
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
// reload the page if turnstile sitekey changed
|
||||||
reload the page if turnstile sitekey changed.
|
if (cache && cache?.info?.cobalt?.turnstileSitekey !== freshInfo?.cobalt?.turnstileSitekey) {
|
||||||
there's no other proper way to do this, at least i couldn't find any :(
|
if (browser) window.location.reload();
|
||||||
*/
|
|
||||||
if (cache?.info?.cobalt?.turnstileSitekey && freshInfo?.cobalt?.turnstileSitekey) {
|
|
||||||
if (browser) {
|
|
||||||
window.location.reload();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue