partkeepr

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

commit 06595d45564fa4f8973a6095a65142be8bb3e3da
parent 3b5ff037b5ffe1510b6e28b5f27bb12c676020d7
Author: Felicia Hummel <felicia@partkeepr.com>
Date:   Tue, 27 Dec 2016 12:15:53 +0100

Check if the category filter is actually instanciated

Diffstat:
Msrc/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js @@ -339,7 +339,9 @@ Ext.define('PartKeepr.PartFilterPanel', { scope: this, disable: function () { - this.categoryFilter.setValue({category: "all"}); + if (this.categoryFilter !== null) { + this.categoryFilter.setValue({category: "all"}); + } } }, @@ -410,7 +412,9 @@ Ext.define('PartKeepr.PartFilterPanel', { scope: this, disable: function () { - this.categoryFilter.setValue({stock: "any"}); + if (this.categoryFilter !== null) { + this.categoryFilter.setValue({stock: "any"}); + } } },