Skip to content
Snippets Groups Projects
Commit c2e6601b authored by Alvin Noe Ladines's avatar Alvin Noe Ladines
Browse files

Fix undefined spectra

Changelog: Fixed
parent dc9b8bb2
No related branches found
No related tags found
1 merge request!2436Fix undefined spectra
......@@ -40,7 +40,7 @@ const SpectroscopicPropertiesCard = React.memo(({index, properties, archive}) =>
// When archive is loaded, fill out the information
if (archive) {
let spectraReferences = archive?.results?.properties?.spectroscopic?.spectra
let spectraReferences = archive?.results?.properties?.spectroscopic?.spectra || []
if (!Array.isArray(spectraReferences)) spectraReferences = [spectraReferences]
if (spectraReferences) {
for (const spectra of spectraReferences) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment