Skip to content

Commit

Permalink
ensure uriSpace variable is always declared to avoid JS crash
Browse files Browse the repository at this point in the history
(cherry picked from commit a789a77)
  • Loading branch information
osma committed Mar 23, 2023
1 parent dea317e commit ba5dc91
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions view/scripts.twig
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ var prefLabels = [{"lang": "{{ search_results|first.label.lang }}","label": "{{
{% endif %}
{% if request.vocab and request.vocab.uriSpace %}
var uriSpace = "{{ request.vocab.uriSpace }}";
{% else %}
var uriSpace = null;
{% endif %}
var showNotation = {% if request.vocab and not request.vocab.config.showNotation %}false{% else %}true{% endif %};
{% if request.vocab %}
Expand Down

0 comments on commit ba5dc91

Please sign in to comment.