@@ -666,7 +666,6 @@ public static object SafeExtractDictionaryValue(Dictionary<string, object> dict,
666666 public static Dictionary < string , object > EvaluateDefineDataNode ( [ ArbitraryDimensionArrayImport ] object inputValue ,
667667 string typeString , bool isList , bool isAutoMode , string playerValue )
668668 {
669-
670669 if ( inputValue == null && string . IsNullOrEmpty ( playerValue ) )
671670 {
672671 // Don't raise a warning if the node is unused
@@ -677,6 +676,18 @@ public static Dictionary<string, object> EvaluateDefineDataNode([ArbitraryDimens
677676 } ;
678677 }
679678
679+ // Unconnected var[]..[] ports can receive an empty sequence default.
680+ if ( string . IsNullOrEmpty ( playerValue )
681+ && inputValue is IEnumerable enumerable and not string
682+ && ! enumerable . Cast < object > ( ) . Any ( ) )
683+ {
684+ return new Dictionary < string , object >
685+ {
686+ { ">" , inputValue } ,
687+ { "Validation" , null }
688+ } ;
689+ }
690+
680691 // If the playerValue is not empty, then we assume it was set by the player.
681692 // In that case, we need to parse it to get the actual value replace the inputValue.
682693 if ( ! string . IsNullOrEmpty ( playerValue ) )
@@ -694,6 +705,17 @@ public static Dictionary<string, object> EvaluateDefineDataNode([ArbitraryDimens
694705 }
695706 }
696707
708+ // A player value can deserialize to null (e.g. "null"), which should
709+ // follow the same behavior as an unused Define Data input.
710+ if ( inputValue == null )
711+ {
712+ return new Dictionary < string , object >
713+ {
714+ { ">" , inputValue } ,
715+ { "Validation" , null }
716+ } ;
717+ }
718+
697719 if ( ! IsSingleValueOrSingleLevelArrayList ( inputValue ) )
698720 {
699721 var warning = Properties . Resources . DefineDataSupportedInputValueExceptionMessage ;
@@ -714,7 +736,16 @@ public static Dictionary<string, object> EvaluateDefineDataNode([ArbitraryDimens
714736 // Type logic - we try to 'guess' the type of the object
715737 if ( type == null || ! IsSupportedDataNodeDynamoType ( inputValue , type . Type , assertList ) )
716738 {
717- var valueType = assertList ? FindCommonAncestor ( arrayList ) : inputValue . GetType ( ) ;
739+ var valueType = assertList ? FindCommonAncestor ( arrayList ) : inputValue ? . GetType ( ) ;
740+ if ( ! assertList && valueType == null )
741+ {
742+ // Defensive null-safe fallback for analyzers: no input means no validation result.
743+ return new Dictionary < string , object >
744+ {
745+ { ">" , inputValue } ,
746+ { "Validation" , null }
747+ } ;
748+ }
718749 if ( valueType == null )
719750 {
720751 // We couldn't find a common ancestor - list containing unsupported or incompatible data types
0 commit comments