Skip to content

Commit

Permalink
[WIP] Allow toggling between doing skipping the recursion or throwing…
Browse files Browse the repository at this point in the history
… an exception
  • Loading branch information
PathogenDavid committed May 14, 2024
1 parent 209e913 commit 1c33329
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Bonsai.Editor/Layout/LayoutHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,13 @@ static IReadOnlyList<VisualizerFactory> GetMashupArguments(InspectBuilder builde
return visualizerMappings.Select(mapping =>
{
// mapping.Source == builder if two visualizers in the mashup visualize the same node
var nestedSources = mapping.Source == builder ? null : GetMashupArguments(mapping.Source, typeVisualizerMap);
var nestedSources = mapping.Source == builder ?
#if false
null
#else
throw new WorkflowBuildException("Visualizer mapping subgraph contains cycles.", builder)
#endif
: GetMashupArguments(mapping.Source, typeVisualizerMap);
var visualizerType = mapping.VisualizerType ?? typeVisualizerMap.GetTypeVisualizers(mapping.Source).FirstOrDefault();
Expand Down

0 comments on commit 1c33329

Please sign in to comment.