mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-02 22:37:32 +00:00
Fix custom widget drawWidget never called (#1068)
This commit is contained in:
@@ -59,6 +59,8 @@ export function toConcreteWidget<TWidget extends IWidget | IBaseWidget>(
|
||||
node: LGraphNode,
|
||||
wrapLegacyWidgets = true,
|
||||
): WidgetTypeMap[TWidget["type"]] | undefined {
|
||||
if (widget instanceof BaseWidget) return widget
|
||||
|
||||
// Assertion: TypeScript has no concept of "all strings except X"
|
||||
type RemoveBaseWidgetType<T> = T extends { type: TWidgetType } ? T : never
|
||||
const narrowedWidget = widget as RemoveBaseWidgetType<TWidget>
|
||||
|
||||
Reference in New Issue
Block a user