diff options
Diffstat (limited to 'web/app/Application.js')
-rw-r--r-- | web/app/Application.js | 6 |
1 files changed, 4 insertions, 2 deletions
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 } } - } + }; } }); |