Skip to content

Error in figure handler #7

@jlev

Description

@jlev

I'm using this theme to self-host a blog with data from ghost on netlify via gatsby. It seems that it breaks if there is a ghost "bookmark" without a description. It's failing at

boomarkCardData.description = node.children[0].value;

Because the node has no children, this causes TypeError: Cannot read property 'value' of undefined. I haven't been able to override this function, because it's not called with the @ style like most of the other components.

Can this be coded more defensively, so it checks for the node's children before calling for the first one? Ideally this wouldn't happen, but this link has a blank meta description tag, and it's not editable in ghost.

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