From ff68c888cd7b72f685b1599bc982cc20274f295e Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Sun, 8 Oct 2023 14:45:52 +0400 Subject: [PATCH] Ensure components with script return `id` in HTML export. Closes #5441 --- src/dom_components/model/Component.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/dom_components/model/Component.ts b/src/dom_components/model/Component.ts index 859a71000..9f77a5fe3 100644 --- a/src/dom_components/model/Component.ts +++ b/src/dom_components/model/Component.ts @@ -675,8 +675,14 @@ export default class Component extends StyleableModel { 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; }