partkeepr

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

commit 3f84c6879ad32ddfdd7c47bc4645b563e15eca9a
parent 7757f707c988ee641e199dcc932eb3c0b3353c0a
Author: Felicia Hummel <felicitus@felicitus.org>
Date:   Fri,  6 Jan 2017 21:45:43 +0100

Merge pull request #768 from partkeepr/PartKeepr-54

Hard-check if unit is an instance of PartKeepr.UnitBundle.Entity.Unit
Diffstat:
Msrc/PartKeepr/FrontendBundle/Resources/public/js/Components/OctoPart/DataApplicator.js | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/OctoPart/DataApplicator.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/OctoPart/DataApplicator.js @@ -286,7 +286,7 @@ Ext.define("PartKeepr.Components.OctoPart.DataApplicator", { findSiPrefixForValueAndUnit: function (value, unit) { var i = 0, prefixedValue, siPrefix; - if (unit === null) { + if (!(unit instanceof PartKeepr.UnitBundle.Entity.Unit)) { return PartKeepr.getApplication().getSiPrefixStore().findRecord("exponent", 0, 0, false, false, true); }