JedWatson / react-component-gulp-tasks

Common Gulp tasks I use across my React Component projects
MIT License
113 stars 42 forks source link

Check for dependencies and peerDependencies before calling Object.keys #11

Closed daviferreira closed 9 years ago

daviferreira commented 9 years ago

Got this error when trying to run the examples on your input-autosize component:

var dependencies = Object.keys(pkg.dependencies);
                              ^
TypeError: Object.keys called on non-object

This PR simply check for the existence of deps and peerDeps. Maybe we should also check for its type? Or just try/catch? :dancer:

Cheers!

JedWatson commented 9 years ago

:+1: thanks @daviferreira

JedWatson commented 9 years ago

Published as v0.7.3