commit 98966d6afb3eb3f6ea1fd6b12ac30dbc67c25105 parent 5962d0f567e4e57765275fe5e00084ffe2f5b21e Author: Felicitus <felicitus@felicitus.org> Date: Sun, 15 Nov 2015 19:24:51 +0100 Check if the given value is an instance of a stroage location, immediately return if otherwise Diffstat:
M | src/PartKeepr/FrontendBundle/Resources/public/js/Components/Widgets/StorageLocationPicker.js | | | 3 | +++ |
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Widgets/StorageLocationPicker.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Widgets/StorageLocationPicker.js @@ -163,6 +163,9 @@ Ext.define("PartKeepr.StorageLocationPicker", { }, setValue: function (value) { + if (value === null || !(value instanceof PartKeepr.StorageLocationBundle.Entity.StorageLocation)) { + return; + } this.selectedStorageLocation = value; this.textValue = value.get("name"); PartKeepr.StorageLocationPicker.superclass.setValue.call(this, value.get("name"));