ComfyUI_frontend icon indicating copy to clipboard operation
ComfyUI_frontend copied to clipboard

widgetInput extension erases any other extension's onGraphConfigured overrides

Open devingfx opened this issue 5 months ago • 1 comments

This core extension do not safely override the ComfyNode.protptype.onGraphConfigured by saving a reference to any previously existing method, therefore any other extension safely hijacking this method get no chance to be executed if it get registered before this one... https://github.com/Comfy-Org/ComfyUI_frontend/blob/b8bdba0bcc6112f7ae8f0df0cc355e32de753c91/src/extensions/core/widgetInputs.ts#L751-L753

This should be written as anywhere else a method is hijacked:

const origOnGraphConfigured = nodeType.prototype.onGraphConfigured;
nodeType.prototype.onGraphConfigured = function () {
	const r = origOnGraphConfigured ? origOnGraphConfigured.apply(this, arguments) : undefined;

devingfx avatar Sep 11 '24 13:09 devingfx