@@ -639,6 +639,8 @@ pub fn document_migration_upgrades(document: &mut DocumentMessageHandler, reset_
639
639
let old_inputs = document. network_interface . replace_inputs ( node_id, network_path, & mut new_node_template) . unwrap ( ) ;
640
640
let index_3_value = old_inputs. get ( 3 ) . cloned ( ) ;
641
641
642
+ let mut upgraded = false ;
643
+
642
644
if let Some ( NodeInput :: Value { tagged_value, exposed : _ } ) = index_3_value {
643
645
if matches ! ( * tagged_value, TaggedValue :: DVec2 ( _) ) {
644
646
// Move index 3 to the end
@@ -648,11 +650,14 @@ pub fn document_migration_upgrades(document: &mut DocumentMessageHandler, reset_
648
650
document. network_interface . set_input ( & InputConnector :: node ( * node_id, 3 ) , old_inputs[ 4 ] . clone ( ) , network_path) ;
649
651
document. network_interface . set_input ( & InputConnector :: node ( * node_id, 4 ) , old_inputs[ 5 ] . clone ( ) , network_path) ;
650
652
document. network_interface . set_input ( & InputConnector :: node ( * node_id, 5 ) , old_inputs[ 3 ] . clone ( ) , network_path) ;
651
- } else {
652
- // Swap it back if we're not changing anything
653
- let _ = document. network_interface . replace_inputs ( node_id, network_path, & mut current_node_template) ;
653
+
654
+ upgraded = true ;
654
655
}
655
656
}
657
+
658
+ if !upgraded {
659
+ let _ = document. network_interface . replace_inputs ( node_id, network_path, & mut current_node_template) ;
660
+ }
656
661
}
657
662
658
663
// Ensure layers are positioned as stacks if they are upstream siblings of another layer
0 commit comments