Skip to content

Commit 6e7a634

Browse files
committed
Fix crash in MainDetails component on Replica edit.
When editing a Replica while looking at its MainDetails screen and changing a value, the MainDetails page in the background automatically re-renders on each value selection, and crashed if the value was edited to be null. Signed-off-by: Nashwan Azhari <nazhari@cloudbasesolutions.com>
1 parent 59d7541 commit 6e7a634

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/components/modules/TransferModule/MainDetails/MainDetails.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,9 @@ class MainDetails extends React.Component<Props, State> {
261261
if (p === "disk_mappings" || p === "backend_mappings") {
262262
return null;
263263
}
264+
if (value[p] == null || value[p] == undefined) {
265+
return null;
266+
}
264267
return {
265268
label: `${label} - ${LabelDictionary.get(p)}`,
266269
value: getValue(p, value[p]),

0 commit comments

Comments
 (0)