From dbf31c907fb261dbc02463e2582a1c1a05ab3657 Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Tue, 23 May 2017 15:43:07 +0500 Subject: If optimization --- web/app/view/dialog/SelectDeviceController.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'web/app/view/dialog/SelectDeviceController.js') diff --git a/web/app/view/dialog/SelectDeviceController.js b/web/app/view/dialog/SelectDeviceController.js index 7b7277c..9ed5e21 100644 --- a/web/app/view/dialog/SelectDeviceController.js +++ b/web/app/view/dialog/SelectDeviceController.js @@ -30,11 +30,7 @@ Ext.define('Traccar.view.dialog.SelectDeviceController', { jsonData: Ext.util.JSON.encode(record), callback: function (options, success, response) { if (success) { - if (response.responseText) { - Ext.Msg.alert(Strings.sharedInfoTitle, response.responseText); - } else if (response.statusText) { - Ext.Msg.alert(Strings.sharedInfoTitle, response.statusText); - } + Ext.Msg.alert(Strings.sharedInfoTitle, response.responseText || response.statusText); } else { Traccar.app.showError(response); } -- cgit v1.2.3