cloudfour / drizzle-builder

The tool for building a Drizzle.
MIT License
6 stars 3 forks source link

Missing data errors with no context #102

Open bryfox opened 7 years ago

bryfox commented 7 years ago

The data helper is missing an undefined check. If I call data("some.invalid.key.path"), then I get TypeError: Cannot read property 'contents' of undefined. From the stacktrace, I see it's a problem with data, but have no idea about what input is causing the problem.

More useful might be to throw an error that indicates that the data is missing at the given path. If that strictness isn't needed/intended, I could imagine instead logging a warning and continuing, but I don't see any patterns like that used elsewhere in the builder.