Fix null host value in layout.html.twig

This commit is contained in:
Loick Piera 2014-02-06 15:12:26 +01:00
parent 414e87b58b
commit b198e240ce

View File

@ -254,7 +254,7 @@
}
// prepare the api enpoint
{% if endpoint == '' and app.request is defined and app.request.host -%}
{% if endpoint == '' and app.request is not null and app.request.host -%}
var endpoint = '{{ app.request.getBaseUrl() }}';
{% else -%}
var endpoint = '{{ endpoint }}';