From d15a49e82481381a571c0c2285edd2fc77ccb5ca Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Fri, 28 Jul 2017 09:29:46 +0500 Subject: Unwrap ternary operator --- web/app/view/edit/Devices.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/app/view/edit/Devices.js b/web/app/view/edit/Devices.js index eda8bbde..c9538c8b 100644 --- a/web/app/view/edit/Devices.js +++ b/web/app/view/edit/Devices.js @@ -164,7 +164,9 @@ Ext.define('Traccar.view.edit.Devices', { if (Ext.isArray(value)) { for (i = 0; i < value.length; i++) { name = Traccar.AttributeFormatter.geofenceIdFormatter(value[i]); - result += name ? name + ((i < value.length - 1) ? ', ' : '') : ''; + if (name) { + result += name + ((i < value.length - 1) ? ', ' : ''); + } } } return result; -- cgit v1.2.3