mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-23 03:22:19 +03:00
TSK-811: Fix for undefined when saving platform last location (#2790)
Signed-off-by: Vyacheslav Tumanov <me@slavatumanov.me>
This commit is contained in:
parent
384aac3682
commit
d65cb70652
@ -115,8 +115,10 @@ export function navigate (location: PlatformLocation, store = true): void {
|
|||||||
if (store) {
|
if (store) {
|
||||||
history.pushState(null, '', url)
|
history.pushState(null, '', url)
|
||||||
localStorage.setItem('platform_last_loc', JSON.stringify(location))
|
localStorage.setItem('platform_last_loc', JSON.stringify(location))
|
||||||
|
if (location.path[1] !== undefined) {
|
||||||
localStorage.setItem(`platform_last_loc_${location.path[1]}`, JSON.stringify(location))
|
localStorage.setItem(`platform_last_loc_${location.path[1]}`, JSON.stringify(location))
|
||||||
}
|
}
|
||||||
|
}
|
||||||
locationWritable.set(location)
|
locationWritable.set(location)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user