wintercms / wn-blocks-plugin

Block based content management plugin for Winter CMS.
MIT License
21 stars 5 forks source link

Fix exceptions if "enableTwigStrictVariables" is set to true #3

Closed xitara closed 1 year ago

LukeTowers commented 1 year ago

Why are those variables not defined?

xitara commented 1 year ago

width has no field-definition, color and icon can be empty

LukeTowers commented 1 year ago

color and icon should both still be defined

xitara commented 1 year ago

yes, but if color ist an empty string, it results in style="background-color: ;" and {% if data.config.icon %} compares against NULL, so if data.config.icon ist an empty string, the i-element will be displayed as <i class="fas mr-2"></i> but it should not displayed without an icon, I think