Fix recruit viewlets selector (#7400)

Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
Kristina 2024-12-09 19:29:47 +04:00 committed by GitHub
parent 37eff56860
commit ef70cf9d00
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -752,9 +752,18 @@ export function categorizeFields (
export function makeViewletKey (loc?: Location): string {
loc = loc != null ? { path: loc.path } : getCurrentResolvedLocation()
loc.fragment = undefined
loc.query = undefined
if (loc.fragment != null && loc.fragment !== '') {
const props = decodeURIComponent(loc.fragment).split('|')
if (props.length >= 3) {
const [panel, , _class] = props
return 'viewlet' + '#' + encodeURIComponent([panel, _class].join('|'))
}
}
loc.fragment = undefined
return 'viewlet' + locationToUrl(loc)
}