Skip to content

Commit

Permalink
fix: set active spectra
Browse files Browse the repository at this point in the history
  • Loading branch information
hamed-musallam committed Nov 10, 2023
1 parent bd77ab4 commit 4f0626b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/component/reducer/actions/SpectrumsActions.ts
Expand Up @@ -369,8 +369,13 @@ function handleChangeActiveSpectrum(
});
}

//set the active spectra
activeSpectra[activeTab] = newActiveSpectra;
if (newActiveSpectra.length > 0) {
//set the active spectra
activeSpectra[activeTab] = newActiveSpectra;
} else {
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete
delete activeSpectra[activeTab];
}

//check if the previous selected spectra contain FT
const previousActiveSpectraHasFT = spectra?.some(
Expand Down

0 comments on commit 4f0626b

Please sign in to comment.