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:
parent
a3e2a78aae
commit
9b4144176a
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue