Skip to content

Commit

Permalink
reduce indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeAlhayek committed May 15, 2024
1 parent a9cf772 commit d747dda
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,16 @@ public async Task<ISite> GetSiteSettingsAsync()
/// </summary>
public async Task UpdateSiteSettingsAsync(ISite site)
{
if (site is SiteSettings siteSettings)
if (site is not SiteSettings siteSettings)
{
await _documentManager.UpdateAsync(siteSettings);

// Clear the internal cache to ensure that any other lookup against
// this document will load the new values until the site is reloaded.
siteSettings.ClearCache();
return;
}

await _documentManager.UpdateAsync(siteSettings);

// Clear the internal cache to ensure that any other lookup against
// this document will load the new values until the site is reloaded.
siteSettings.ClearCache();
}

private Task<SiteSettings> GetDefaultSettingsAsync()
Expand Down

0 comments on commit d747dda

Please sign in to comment.