Skip to content

Commit

Permalink
Merge pull request #34 from bobdenotter/patch-2
Browse files Browse the repository at this point in the history
Better default initialisation of `seovalues`
  • Loading branch information
Fredxd authored Feb 20, 2023
2 parents 9c1b356 + fe0dcff commit c61a5dd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion templates/seo.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
robots: '',
og: ''
}|json_encode %}
{% set seovalues = value|default(defaultValues)|json_decode %}
{% if value is empty or value is not json %}
{% set value = defaultValues %}
{% endif %}
{% set seovalues = value|json_decode %}

<div id="field-set-{{ name }}" class="form-group form-set is-normal">
{% include '@bolt/_partials/fields/_label.html.twig' %}
Expand Down

0 comments on commit c61a5dd

Please sign in to comment.