CreateImageWizard: remove unsafe optional chaining

Optional chaining can return undefined. So, we should not use `of` on
getState()?.values?.['file-system-configuration']. But, since we already
check for the existance of this variable we do not need to optionally
chain.
This commit is contained in:
Jacob Kozol 2022-03-02 22:01:38 +01:00 committed by jkozol
parent a3e2a78aae
commit 9b4144176a

View file

@ -72,7 +72,7 @@ const ReviewStep = () => {
if (getState()?.values?.['file-system-config-toggle'] === 'manual' &&
getState()?.values?.['file-system-configuration']) {
let size = 0;
for (const fsc of getState()?.values?.['file-system-configuration']) {
for (const fsc of getState().values['file-system-configuration']) {
size += (fsc.size * fsc.unit);
}