[Cleanup] Remove unused LGraphNode.callback (#2857)

This commit is contained in:
Chenlei Hu
2025-03-04 16:05:12 -05:00
committed by GitHub
parent 2d179ad632
commit 05b6f6d8a2

View File

@@ -92,13 +92,9 @@ export const useImageUploadWidget = () => {
)
uploadWidget.label = t('g.choose_file_to_upload')
// TODO: Explain this?
// @ts-expect-error LGraphNode.callback is not typed
// Add our own callback to the combo widget to render an image when it changes
const cb = node.callback
fileComboWidget.callback = function (...args) {
fileComboWidget.callback = function () {
nodeOutputStore.setNodeOutputs(node, fileComboWidget.value)
if (cb) return cb.apply(this, args)
}
// On load if we have a value then render the image