From 3e2c3b93bd21a5f48ba64e97db5389f858e48609 Mon Sep 17 00:00:00 2001 From: Carolina Capetillo Date: Wed, 11 Dec 2024 14:30:03 -0800 Subject: [PATCH] adds if statement --- src/utils/populateInstrumentsUtils.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/utils/populateInstrumentsUtils.js b/src/utils/populateInstrumentsUtils.js index 5014ab2..1297e80 100644 --- a/src/utils/populateInstrumentsUtils.js +++ b/src/utils/populateInstrumentsUtils.js @@ -8,6 +8,9 @@ export const getFilterList = async () => { method: 'GET' }) const filterList = [] + if (!response) { + return filterList + } Object.values(response).forEach((instrument) => { if (instrument.class === '0m4' && instrument.optical_elements.filters) { const schedulableFilters = instrument.optical_elements.filters