From 30f1a770f867de05a89ee6073dc002137d5e4512 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sun, 8 Nov 2015 14:24:10 +1300 Subject: Fix JavaScript jshint issues --- web/app/Application.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'web/app/Application.js') diff --git a/web/app/Application.js b/web/app/Application.js index 83ca9e860..9a7afc3b9 100644 --- a/web/app/Application.js +++ b/web/app/Application.js @@ -86,7 +86,9 @@ Ext.define('Traccar.Application', { if (!result.success) { Ext.Msg.alert(Strings.errorTitle, result.error); } - handler.call(scope, options, success, response); + if (handler) { + handler.call(scope, options, success, response); + } } else { if (response.statusText) { Ext.Msg.alert(Strings.errorTitle, response.statusText); @@ -94,6 +96,6 @@ Ext.define('Traccar.Application', { Ext.Msg.alert(Strings.errorTitle, response.status.toString()); // TODO: text message } } - } + }; } }); -- cgit v1.2.3