Impossible to access an attribute (\"custom_endpoint\") on a NULL variable

My setup obviously does not have a authentication property set. This change fixes the error.
This commit is contained in:
Markus Thielen 2014-08-18 11:55:01 +02:00
parent d32381d18d
commit b6f7179b59

View File

@ -396,7 +396,7 @@
{% else -%}
var endpoint = '{{ endpoint }}';
{% endif -%}
{% if authentication.custom_endpoint %}
{% if authentication and authentication.custom_endpoint %}
if ($('#api_endpoint') && typeof($('#api_endpoint').val()) != 'undefined') {
endpoint = $('#api_endpoint').val();
}