diff --git a/src/scripts/domWidget.ts b/src/scripts/domWidget.ts index 1e9f6bf901..92b4e1b512 100644 --- a/src/scripts/domWidget.ts +++ b/src/scripts/domWidget.ts @@ -195,6 +195,15 @@ export class DOMWidgetImpl /** Extract DOM widget size info */ computeLayoutSize(node: LGraphNode) { + // @ts-expect-error custom widget type + if (this.type === 'hidden') { + return { + minHeight: 0, + maxHeight: 0, + minWidth: 0 + } + } + const styles = getComputedStyle(this.element) let minHeight = this.options.getMinHeight?.() ??