fix: d4dc4e2-introduced error (#100)

* adds helpful error message when files is overridden or empty

* fix: d4dc4e2-introduced error

The prior commit to this branch d4dc4e2 introduced an error
in the util/config.js file where it checks for the length of
the content.files property, whether that property exists in
the config or not.
This commit is contained in:
Tyler Reitz 2018-06-19 20:21:12 -07:00 committed by Kent C. Dodds
parent 3f2ae00cbc
commit 54febd3c45

View file

@ -24,7 +24,8 @@ function writeConfig(configPath, content) {
if (!content.projectName) {
throw new Error(`Error! Project name is not set in ${configPath}`)
}
if (!content.files.length) {
if (content.files && !content.files.length) {
throw new Error(
`Error! Project files was overridden and is empty in ${configPath}`,
)