mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-13 21:24:01 +00:00
ui: state provider: try to find string encoded values in dictionary
My browser here is pretty fixated on the history, and due to some unknown reason I got a history fragment string like: `#v1:=0:=18:=4:::::::` so the "hashes" got into strings, and I was not able to move them back. Adding a match here to always try reverse-mapping the hash to the original input helps to fix that here. We'd only run into issues if we'd use a integer-string as id, but we really don't (IIRC not even allowed in extjs) so this is safe to do. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
2f6cf848b6
commit
d6b661874c
@ -124,12 +124,11 @@ Ext.define('PVE.StateProvider', {
|
|||||||
if (value) {
|
if (value) {
|
||||||
if (value[0] === '=') {
|
if (value[0] === '=') {
|
||||||
value = decodeURIComponent(value.slice(1));
|
value = decodeURIComponent(value.slice(1));
|
||||||
} else {
|
}
|
||||||
for (const [key, hash] of Object.entries(me.compDict)) {
|
for (const [key, hash] of Object.entries(me.compDict)) {
|
||||||
if (value === hash) {
|
if (String(value) === String(hash)) {
|
||||||
value = key;
|
value = key;
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user