diff --git a/src/app/[locale]/roof2/RoofSelect.jsx b/src/app/[locale]/roof2/RoofSelect.jsx index 25b9e04c..d759398b 100644 --- a/src/app/[locale]/roof2/RoofSelect.jsx +++ b/src/app/[locale]/roof2/RoofSelect.jsx @@ -19,9 +19,9 @@ export default function RoofSelect() { useEffect(() => { get({ url: '/api/roof-material/roof-material-infos' }).then((res) => { - if (res.length === 0) { - return - } + //TODO: error handling + if (!res) return + setRoofMaterials(res) }) }, [])