Skip to content

Conversation

@amrdraz
Copy link

@amrdraz amrdraz commented Jun 20, 2015

I would get

   Warning: Cannot read property 'forEach' of undefined Use --force to continue.  
   TypeError: Cannot read property 'forEach' of undefined
    at Object.<anonymous> (/node_modules/grunt-purifycss/tasks/purifycss.js:22:18)
   .
   .

and then the task would stop

looking at the grunt API I noticed that data simply returns the object value I passed in my config
which if according to the example is inside data.target not the data object itself

using grunt 0.4.5 (but I got that from the latest documentation for the API

I would get 

```
   Warning: Cannot read property 'forEach' of undefined Use --force to continue.  
   TypeError: Cannot read property 'forEach' of undefined
    at Object.<anonymous> (/node_modules/grunt-purifycss/tasks/purifycss.js:22:18)
   .
   .
```

and then the task would stop

looking at the grunt API I noticed that data simply returns the object value I passed in my config
which if according to the example is inside data.target not the data object itself

using grunt 0.4.5 (but I got that from the latest documentation for the API
@kennyt
Copy link
Member

kennyt commented Feb 17, 2016

Hmm, I can't seem to reproduce this. If I make it data.target.src I get undefined

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