api-viewer-element icon indicating copy to clipboard operation
api-viewer-element copied to clipboard

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

Open tpluscode opened this issue 1 year ago • 0 comments

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 }.

tpluscode avatar Nov 25 '24 11:11 tpluscode