partkeepr

fork of partkeepr
git clone https://git.e1e0.net/partkeepr.git
Log | Files | Refs | Submodules | README | LICENSE

commit fe664100b097dfb1dad4671e4647c0eeb442e75f
parent e919c1a4d711b599890ff4d028cd23d3cf6c24eb
Author: Felicitus <felicitus@felicitus.org>
Date:   Sat, 28 Nov 2015 16:48:44 +0100

Check the type of the target. Submenus aren't functions

Diffstat:
Msrc/PartKeepr/FrontendBundle/Resources/public/js/PartKeepr.js | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/PartKeepr.js b/src/PartKeepr/FrontendBundle/Resources/public/js/PartKeepr.js @@ -48,7 +48,9 @@ Ext.application({ this.loginManager.login(); }, onAppMenuClick: function (item) { - this.openAppItem(item.target["$className"]); + if (typeof item.target === "function") { + this.openAppItem(item.target["$className"]); + } }, openAppItem: function (target) { targetClass = Ext.ClassManager.get(target);