mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-22 11:01:54 +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,7 +115,9 @@ export function navigate (location: PlatformLocation, store = true): void {
|
||||
if (store) {
|
||||
history.pushState(null, '', url)
|
||||
localStorage.setItem('platform_last_loc', JSON.stringify(location))
|
||||
localStorage.setItem(`platform_last_loc_${location.path[1]}`, JSON.stringify(location))
|
||||
if (location.path[1] !== undefined) {
|
||||
localStorage.setItem(`platform_last_loc_${location.path[1]}`, JSON.stringify(location))
|
||||
}
|
||||
}
|
||||
locationWritable.set(location)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user