Skip to content

Error thrown when -changed even occurs for knob which does not exist #212

@tpluscode

Description

@tpluscode

I use the API viewer element like

<api-viewer exclude-knobs="quads" src="./custom-elements.json">
  <template data-element="rdf-editor" data-target="host">
    <rdf-editor></rdf-editor>
  </template>
</api-viewer>

The rdf-element component fires a quads-changed event. Even though the prop is included in exclude-knobs, it still tries to run host.syncKnob and fails with

Uncaught TypeError: Cannot destructure property 'name' of 'changed' as it is undefined.

That is because the value returned from getKnob is { knob: undefined; custom: true }.

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