Skip to content

Commit b95be09

Browse files
fix(ui): event listeners for filters prematurely cleared
1 parent a7ce420 commit b95be09

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

invokeai/frontend/web/src/features/controlLayers/konva/CanvasStateApiModule.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -326,10 +326,6 @@ export class CanvasStateApiModule extends CanvasModuleBase {
326326
return;
327327
}
328328

329-
// event.status is 'failed', 'canceled' or 'completed' - something has gone awry
330-
_clearTimeout();
331-
clearListeners();
332-
333329
if (event.status === 'completed') {
334330
/**
335331
* The invocation_complete event should have been received before the queue item completed event, and the
@@ -342,9 +338,16 @@ export class CanvasStateApiModule extends CanvasModuleBase {
342338
*
343339
* For now, we'll just log a warning instead of rejecting the promise. This should be super rare anyways.
344340
*/
345-
this.log.warn('Queue item completed without output node completion event');
346341
// reject(new Error('Queue item completed without output node completion event'));
347-
} else if (event.status === 'failed') {
342+
this.log.warn('Queue item completed without output node completion event');
343+
return;
344+
}
345+
346+
// event.status is 'failed', 'canceled' - something has gone awry
347+
_clearTimeout();
348+
clearListeners();
349+
350+
if (event.status === 'failed') {
348351
// We expect the event to have error details, but technically it's possible that it doesn't
349352
const { error_type, error_message, error_traceback } = event;
350353
if (error_type && error_message && error_traceback) {

0 commit comments

Comments
 (0)