Skip to content

Commit d2f8c99

Browse files
committed
Avoid panics during document migration
1 parent 8a68683 commit d2f8c99

File tree

2 files changed

+392
-388
lines changed

2 files changed

+392
-388
lines changed

editor/src/messages/portfolio/document/utility_types/network_interface.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ impl NodeNetworkInterface {
674674
let input_type = self.input_type(&InputConnector::node(*node_id, iterator_index), network_path).0;
675675
// Value inputs are stored as concrete, so they are compared to the nested type. Node inputs are stored as fn, so they are compared to the entire type.
676676
// For example a node input of (Footprint) -> VectorData would not be compatible with () -> VectorData
677-
node_io.inputs[iterator_index].clone().nested_type() == &input_type || node_io.inputs[iterator_index] == input_type
677+
node_io.inputs.get(iterator_index).map(|ty| ty.nested_type().clone()).as_ref() == Some(&input_type) || node_io.inputs.get(iterator_index) == Some(&input_type)
678678
});
679679
if valid_implementation { node_io.inputs.get(*input_index).cloned() } else { None }
680680
})

0 commit comments

Comments
 (0)