Skip to content

Commit

Permalink
Add missing await keywork in ShapeResult (#16683)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienros authored Sep 6, 2024
1 parent ed706e9 commit 190d452
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,10 @@ private async Task ApplyImplementationAsync(BuildShapeContext context, string di
// These Displaying methods are used to create alternates for instance, so the
// Shape needs to have required properties available first.

_initializing?.Invoke(Shape);
if (_initializing != null)
{
await _initializing.Invoke(Shape);
}

if (_displaying != null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,11 @@ public async Task<ContentItem> GetSettingsAsync(User user, ContentTypeDefinition
}

contentItem = await _contentManager.NewAsync(settingsType.Name);
await factoryAsync?.Invoke();

if (factoryAsync != null)
{
await factoryAsync.Invoke();
}

return contentItem;
}
Expand Down

0 comments on commit 190d452

Please sign in to comment.