ui: MainView: use new beforeChangePath signature

subpath can be optional in extjs 7.0, so handle that

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2021-05-26 11:12:04 +02:00 committed by Thomas Lamprecht
parent dbf5dad1c4
commit 90066d22a0
1 changed files with 7 additions and 1 deletions

View File

@ -34,9 +34,15 @@ Ext.define('PBS.MainView', {
return [xtype, config]; return [xtype, config];
}, },
beforeChangePath: function(path, subpath, action) { beforeChangePath: function(path, subpathOrAction, action) {
var me = this; var me = this;
let subpath = subpathOrAction;
if (!action) {
action = subpathOrAction;
subpath = undefined;
}
let [xtype, config] = me.parseRouterPath(path); let [xtype, config] = me.parseRouterPath(path);
if (!Ext.ClassManager.getByAlias(`widget.${xtype}`)) { if (!Ext.ClassManager.getByAlias(`widget.${xtype}`)) {