Browse Source

Ensure components with script return `id` in HTML export. Closes #5441

pull/5463/head
Artur Arseniev 2 years ago
parent
commit
ff68c888cd
  1. 10
      src/dom_components/model/Component.ts

10
src/dom_components/model/Component.ts

@ -675,8 +675,14 @@ export default class Component extends StyleableModel<ComponentProperties> {
addId = !!sm?.get(id, sm.Selector.TYPE_ID);
}
// Symbols should always have an id
if (this.__getSymbol() || this.__getSymbols()) {
if (
// Symbols should always have an id
this.__getSymbol() ||
this.__getSymbols() ||
// Components with script should always have an id
this.get('script-export') ||
this.get('script')
) {
addId = true;
}

Loading…
Cancel
Save