From 90066d22a00da8616c5ae587b758c91835219437 Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Wed, 26 May 2021 11:12:04 +0200 Subject: [PATCH] ui: MainView: use new beforeChangePath signature subpath can be optional in extjs 7.0, so handle that Signed-off-by: Dominik Csapak --- www/MainView.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/www/MainView.js b/www/MainView.js index cd63f4c7..ef52f094 100644 --- a/www/MainView.js +++ b/www/MainView.js @@ -34,9 +34,15 @@ Ext.define('PBS.MainView', { return [xtype, config]; }, - beforeChangePath: function(path, subpath, action) { + beforeChangePath: function(path, subpathOrAction, action) { var me = this; + let subpath = subpathOrAction; + if (!action) { + action = subpathOrAction; + subpath = undefined; + } + let [xtype, config] = me.parseRouterPath(path); if (!Ext.ClassManager.getByAlias(`widget.${xtype}`)) {