Skip to content

Commit

Permalink
fix deprecated use of spaceless
Browse files Browse the repository at this point in the history
  • Loading branch information
lenybernard committed Jul 15, 2020
1 parent 4b4c560 commit 0a5b1c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Resources/views/notie.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
$(document).ready(function(){
notie.setOptions({
{% for key, value in options %}
{% spaceless %}
{% apply spaceless %}
{# if value is boolean, integer or float, do not wrap with quote #}
{% if value != true or value != false or value matches '/^\\d+$/' or value matches '/^[-+]?[0-9]*\\.?[0-9]+$/' %}
{% set wrapper = false %}
{% endif %}
{% set wrapper = true %}
{{ key }}: {% if wrapper %}"{% endif %}{{ value }}{% if wrapper %}"{% endif %}
{% if not loop.last %},{% endif %}
{% endspaceless %}
{% endapply %}
{% endfor %}
});
Expand Down

0 comments on commit 0a5b1c7

Please sign in to comment.