aboutsummaryrefslogtreecommitdiff
path: root/web/app/Application.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/app/Application.js')
-rw-r--r--web/app/Application.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/web/app/Application.js b/web/app/Application.js
index 83ca9e860..ebf685dbc 100644
--- a/web/app/Application.js
+++ b/web/app/Application.js
@@ -86,14 +86,16 @@ 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);
} else {
- Ext.Msg.alert(Strings.errorTitle, response.status.toString()); // TODO: text message
+ Ext.Msg.alert(Strings.errorTitle, Strings.errorConnection);
}
}
- }
+ };
}
});