From 0b5d20c9f004ed3050168ba9792a99fe50b592e1 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 4 Jul 2024 09:56:47 +1000 Subject: [PATCH] fix(ui): merge conflicts in image deletion listener --- .../listeners/imageDeletionListeners.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/imageDeletionListeners.ts b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/imageDeletionListeners.ts index 9278cf94b6..4c9a045d60 100644 --- a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/imageDeletionListeners.ts +++ b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/imageDeletionListeners.ts @@ -40,8 +40,8 @@ const deleteNodesImages = (state: RootState, dispatch: AppDispatch, imageDTO: Im }; const deleteControlAdapterImages = (state: RootState, dispatch: AppDispatch, imageDTO: ImageDTO) => { - state.canvasV2.controlAdapters.forEach(({ id, image, processedImage }) => { - if (image?.name === imageDTO.image_name || processedImage?.name === imageDTO.image_name) { + state.canvasV2.controlAdapters.entities.forEach(({ id, imageObject, processedImageObject }) => { + if (imageObject?.image.name === imageDTO.image_name || processedImageObject?.image.name === imageDTO.image_name) { dispatch(caImageChanged({ id, imageDTO: null })); dispatch(caProcessedImageChanged({ id, imageDTO: null })); } @@ -49,15 +49,15 @@ const deleteControlAdapterImages = (state: RootState, dispatch: AppDispatch, ima }; const deleteIPAdapterImages = (state: RootState, dispatch: AppDispatch, imageDTO: ImageDTO) => { - state.canvasV2.ipAdapters.forEach(({ id, imageObject: image }) => { - if (image?.name === imageDTO.image_name) { + state.canvasV2.ipAdapters.entities.forEach(({ id, imageObject }) => { + if (imageObject?.image.name === imageDTO.image_name) { dispatch(ipaImageChanged({ id, imageDTO: null })); } }); }; const deleteLayerImages = (state: RootState, dispatch: AppDispatch, imageDTO: ImageDTO) => { - state.canvasV2.layers.forEach(({ id, objects }) => { + state.canvasV2.layers.entities.forEach(({ id, objects }) => { let shouldDelete = false; for (const obj of objects) { if (obj.type === 'image' && obj.image.name === imageDTO.image_name) {