File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -80,6 +80,12 @@ export function createGraphFile(name?: string): GraphFile {
8080 // Clean params from all nodes (remove internal UI params, empty values, dead params)
8181 const cleanedNodes = nodes . map ( n => cleanNodeForExport ( n ) ) ;
8282
83+ // Clean empty strings to null in settings so they round-trip correctly
84+ // (empty strings are used internally for placeholder display but shouldn't be persisted)
85+ const cleanedSettings = Object . fromEntries (
86+ Object . entries ( settings ) . map ( ( [ k , v ] ) => [ k , v === '' ? null : v ] )
87+ ) as SimulationSettings ;
88+
8389 return {
8490 version : GRAPH_FILE_VERSION ,
8591 metadata : {
@@ -96,7 +102,7 @@ export function createGraphFile(name?: string): GraphFile {
96102 codeContext : {
97103 code
98104 } ,
99- simulationSettings : settings
105+ simulationSettings : cleanedSettings
100106 } ;
101107}
102108
You can’t perform that action at this time.
0 commit comments