开发:清理代码

pull/1466/MERGE
ChenX 4 years ago
parent fc2a51b0bb
commit d252dc94ef

@ -33,10 +33,7 @@ if (location.hostname !== "localhost")
if (!res.ok) return; if (!res.ok) return;
res.text().then(serverVersion => res.text().then(serverVersion =>
{ {
if (res.status) if (res.status && serverVersion && version !== serverVersion)
if (serverVersion)
{
if (version !== serverVersion)
{ {
document.body.style.cssText = ` document.body.style.cssText = `
text-align: center; text-align: center;
@ -49,7 +46,6 @@ if (location.hostname !== "localhost")
document.body.textContent = "发现新版本,升级中!"; document.body.textContent = "发现新版本,升级中!";
location.reload(); location.reload();
} }
}
}); });
}); });
} }

Loading…
Cancel
Save