Skip to content

Commit

Permalink
Bug fix for when Bindings are null
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertTheGrey committed Jan 9, 2011
1 parent 8cd8f57 commit edb0a85
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Spark/Compiler/NodeVisitors/BindingExpansionVisitor.cs
Expand Up @@ -120,6 +120,7 @@ private static IEnumerable<BindingNode> AllNodes(Binding binding)

private Binding MatchElementBinding(ElementNode node)
{
if (Context.Bindings == null) return null;
var bindingsForName = Context.Bindings.Where(binding => binding.ElementName == node.Name);
var withAttributesSatisfied = bindingsForName.Where(binding => RequiredReferencesSatisfied(binding, node));
return withAttributesSatisfied.FirstOrDefault();
Expand Down

0 comments on commit edb0a85

Please sign in to comment.