diff --git a/src/components/Dialog/Dialog.tsx b/src/components/Dialog/Dialog.tsx index 04abf73c..c8908689 100644 --- a/src/components/Dialog/Dialog.tsx +++ b/src/components/Dialog/Dialog.tsx @@ -257,12 +257,12 @@ export default class Dialog extends Component { // check if previously selected source exists // if it does, add it to state. - const previouslySelectedSource = + const previouslySelectedSourceID = invocationParams?.selectedImage?.selectedSource?.id || installationParams.sourceID; const selectedSource = sources.find((source: any) => { - return source.id === previouslySelectedSource; + return source.id === previouslySelectedSourceID; }); if (selectedSource) {