AutoMin-Craft icon indicating copy to clipboard operation
AutoMin-Craft copied to clipboard

Graceful failure when no source files are detected

Open SimonEast opened this issue 9 years ago • 0 comments

Currently the plugin generates an error when no source files are present within an automin block. It would be preferable to have the plugin simply output nothing (or a comment) instead of an error.

It's useful because if you have a block like this:

{% filter automin('js') %}
    {{ getFootHtml() }}
{% endfilter %}

...there might be some pages where getFootHtml() might actually be empty, and it would be preferred to fail gracefully.

I've fixed this in my local copy and will submit a PR shortly.

SimonEast avatar Jan 03 '17 04:01 SimonEast