mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-06 13:33:34 +00:00
check if tabs exist before selecting them
when switching from a vm to a template, if you have a tab selected which does not exists in a template (for example console or task history) you break the site this patch checks if the wanted tab actually exists, and leave it on default (the first) when it does not Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
ab5022deb4
commit
e008e6e44f
@ -23,7 +23,13 @@ Ext.define('PVE.panel.Config', {
|
||||
var state = sp.get(stateid);
|
||||
if (state && state.value) {
|
||||
var res = hsregex.exec(state.value);
|
||||
if (res && res[1]) {
|
||||
if (res && res[1] && Ext.isArray(me.items)) {
|
||||
me.items.forEach(function(item) {
|
||||
if (item.itemId === res[1]) {
|
||||
activeTab = res[1];
|
||||
}
|
||||
});
|
||||
} else if (res && res[1] && me.items && me.items.itemId === res[1]) {
|
||||
activeTab = res[1];
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user