partkeepr

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

commit 7fe17aed7d9378bee69d7cc8d80afce6e99e66cc
parent 3cf793c8c64adb151125dbf623d45bb959b1234c
Author: Felicitus <felicitus@felicitus.org>
Date:   Thu,  5 Nov 2015 14:22:24 +0100

Check for null values within the TreePicker, related to #472

Diffstat:
Msrc/PartKeepr/FrontendBundle/Resources/public/js/ExtJS/Enhancements/Ext.ux.TreePicker-setValueWithObject.js | 5++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/ExtJS/Enhancements/Ext.ux.TreePicker-setValueWithObject.js b/src/PartKeepr/FrontendBundle/Resources/public/js/ExtJS/Enhancements/Ext.ux.TreePicker-setValueWithObject.js @@ -25,7 +25,7 @@ Ext.define("PartKeepr.ux.TreePicker", { // try to find a record in the store that matches the value record = value ? me.store.getNodeById(value) : me.store.getRoot(); - if (value === undefined) { + if (value === undefined || value === null) { record = me.store.getRoot(); me.value = record.getId(); } else { @@ -81,4 +81,4 @@ Ext.define("PartKeepr.ux.TreePicker", { me.fireEvent('select', me, record); me.collapse(); }, -});- \ No newline at end of file +});