File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
invokeai/frontend/web/src/features/controlLayers/konva/CanvasEntity Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -424,9 +424,15 @@ export class CanvasEntityFilterer extends CanvasModuleBase {
424424 // the user has applied the filter and the image has been adopted by the parent entity.
425425 if ( this . imageModule && this . imageModule . konva . group . parent === this . konva . group ) {
426426 this . imageModule . destroy ( ) ;
427- this . imageModule = null ;
428427 }
428+
429+ // When a filter is applied, the image module is adopted by the parent entity as a "permanent" module.
430+ // Null this reference to prevent the filter module from accidentally trying to destroy a module that the
431+ // parent entity is now responsible for.
432+ this . imageModule = null ;
433+
429434 const initialFilterConfig = deepClone ( this . $initialFilterConfig . get ( ) ?? this . createInitialFilterConfig ( ) ) ;
435+
430436 this . $filterConfig . set ( initialFilterConfig ) ;
431437 this . $imageState . set ( null ) ;
432438 this . $lastProcessedHash . set ( '' ) ;
You can’t perform that action at this time.
0 commit comments