TSK-47 fix (#2058)

Signed-off-by: Denis Bykhov <80476319+BykhovDenis@users.noreply.github.com>
This commit is contained in:
Denis Bykhov 2022-06-11 00:01:57 +06:00 committed by GitHub
parent 476558421b
commit 7ad85f8fc0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -136,18 +136,19 @@
if (currentApp !== app) {
clear(1)
currentApp = app
if (space === undefined) {
const last = localStorage.getItem(`platform_last_loc_${currentApp}`)
if (last !== null) {
const newLocation: Location = JSON.parse(last)
loc.path[2] = space = newLocation.path[2] as Ref<Space>
loc.path[3] = special = newLocation.path[3]
}
}
currentApplication = await client.findOne(workbench.class.Application, { _id: currentApp })
navigatorModel = currentApplication?.navigatorModel
}
if (space === undefined) {
const last = localStorage.getItem(`platform_last_loc_${currentApp}`)
if (last !== null) {
const newLocation: Location = JSON.parse(last)
loc.path[2] = space = newLocation.path[2] as Ref<Space>
loc.path[3] = special = newLocation.path[3]
}
}
if (currentSpecial === undefined || currentSpecial !== space) {
const newSpecial = space !== undefined ? getSpecialComponent(space) : undefined
if (newSpecial !== undefined) {