mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-12 04:37:44 +02:00
Reload when upgrade (#5942)
This commit is contained in:
@@ -196,7 +196,7 @@ export async function connect (title: string): Promise<Client | undefined> {
|
||||
|
||||
if (currentVersionStr !== reconnectVersionStr) {
|
||||
// It seems upgrade happened
|
||||
// location.reload()
|
||||
location.reload()
|
||||
versionError.set(`${currentVersionStr} != ${reconnectVersionStr}`)
|
||||
}
|
||||
const serverVersion: { version: string } = await ctx.with(
|
||||
@@ -211,6 +211,7 @@ export async function connect (title: string): Promise<Client | undefined> {
|
||||
version !== undefined ? versionToString(version) : ''
|
||||
)
|
||||
if (serverVersion.version !== '' && serverVersion.version !== currentVersionStr) {
|
||||
location.reload()
|
||||
versionError.set(`${currentVersionStr} => ${serverVersion.version}`)
|
||||
} else {
|
||||
versionError.set(undefined)
|
||||
|
||||
Reference in New Issue
Block a user