Skip to content

Missing data errors with no context #102

@bryfox

Description

@bryfox

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions