Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: gracefully use default for assets #191

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wesleycho
Copy link

  • If the assets key is not set in the options object (i.e. the files array has all of the listed assets desired), set to default to an empty array

This gracefully handles the situation where one is not using options.assets - Grunt expects it to be an array of strings, so it being undefined causes Grunt to error.

- If the assets key is not set in the options object (i.e. the files array has all of the listed assets desired), set to default to an empty array
@benhoIIand
Copy link
Owner

benhoIIand commented Apr 18, 2016

Hi @wesleycho. What's the use case for this? When would this task be run without the need to provide assets to be busted?

@wesleycho
Copy link
Author

@HollandBen my company specified the assets with the files array - upon upgrading grunt to 1.0, we ran into this regression in this library where it would fail without the options asset key being an array.

@benhoIIand
Copy link
Owner

The assets option is a hard requirement for the plugin to work (from v1 onwards). It's worth having a read through the documentation and #147 first to make sure you've got the correct configuration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants