-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some improvements around building common shapes #15652
Conversation
@@ -97,8 +98,8 @@ public async Task<IHtmlContent> ExecuteAsync(DisplayContext context) | |||
await shapeDescriptor.DisplayingAsync.InvokeAsync((action, displayContext) => action(displayContext), displayContext, _logger); | |||
|
|||
// Copy all binding sources (all templates for this shape) in order to use them as Localization scopes. | |||
shapeMetadata.BindingSources = shapeDescriptor.BindingSources.Where(x => x != null).ToList(); | |||
if (!shapeMetadata.BindingSources.Any()) | |||
shapeMetadata.BindingSources = shapeDescriptor.BindingSources; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you check that no null
values can be set as Bindingsources
in any way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in the ShapeAlterationBuilder.cs which is why I added a null check. and if needed, we can add .Where(x => x != null)
in the ShapeDescriptorIndex
class instead so it is not evaluated on every call.
This pull request has merge conflicts. Please resolve those before requesting a review. |
No description provided.