InseeFrLab / onyxia

🔬 Data science environment for k8s
https://onyxia.sh
MIT License
432 stars 78 forks source link

Use `null` instead of `undefined` to represent "not yet ready" data in the usecases selector. #816

Open garronej opened 1 month ago

garronej commented 1 month ago

I should do this otherwise this kind of issues can arise if I'm not focussed enought:

https://github.com/InseeFrLab/onyxia/issues/804

Using null instead like what I did in this usecase solves it:

https://github.com/InseeFrLab/onyxia/blob/main/web/src/core/usecases/s3ConfigCreation/selectors.ts

This way we don't have to think to much about what entries must be listed here (to know if the value when ready can also be undefined):

https://github.com/InseeFrLab/onyxia/blob/b9105810fdcf53715ffe60db3e68dcb8adaa6869/web/src/core/usecases/s3ConfigCreation/selectors.ts#L282-L287