Fix close panel on empty fragment (#938)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2022-02-07 16:05:54 +07:00 committed by GitHub
parent 8241ea3d79
commit 36a1b4d157
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,6 +17,8 @@ location.subscribe((loc) => {
if (loc.fragment !== currentLocation && loc.fragment !== undefined && loc.fragment.trim().length > 0) {
const props = decodeURIComponent(loc.fragment).split('|')
showPanel(props[0] as AnyComponent, props[1], props[2], 'full')
} else if (loc.fragment === '' || (loc.fragment !== undefined && loc.fragment.trim().length === 0)) {
closePanel()
}
})