Skip to content

Commit

Permalink
Fixed smalled things due to nullable refernece types
Browse files Browse the repository at this point in the history
  • Loading branch information
bergmania committed Nov 14, 2023
1 parent 7371046 commit 97aa623
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Umbraco.Web.Common/Profiler/WebProfiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class WebProfiler : IProfiler
public void Start()
{
MiniProfiler.StartNew();
MiniProfilerContext.Value = MiniProfiler.Current;
MiniProfilerContext.Value = MiniProfiler.Current!;
}

public void Stop(bool discardResults = false) => MiniProfilerContext.Value?.Stop(discardResults);
Expand Down Expand Up @@ -84,7 +84,7 @@ public void UmbracoApplicationEndRequest(HttpContext context, RuntimeLevel runti

if (cookieValue is not null)
{
AddSubProfiler(MiniProfiler.FromJson(cookieValue));
AddSubProfiler(MiniProfiler.FromJson(cookieValue)!);
}

// If it is a redirect to a relative path (local redirect)
Expand Down
2 changes: 1 addition & 1 deletion src/Umbraco.Web.Common/Profiler/WebProfilerHtml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public string Render()

var result = StackExchange.Profiling.Internal.Render.Includes(
profiler,
context is not null ? context.Request.PathBase + path : null,
context is not null ? context.Request.PathBase + path : string.Empty,
true,
new List<Guid> { profiler.Id },
RenderPosition.Right,
Expand Down
1 change: 0 additions & 1 deletion tests/Umbraco.Tests.Common/Umbraco.Tests.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

<ItemGroup>
<PackageReference Include="AutoFixture.AutoMoq" Version="4.18.0" />
<PackageReference Include="MiniProfiler.AspNetCore" Version="4.2.22" />
<PackageReference Include="Moq" Version="4.18.4" />
<PackageReference Include="AutoFixture.NUnit3" Version="4.18.0" />
<PackageReference Include="NUnit" Version="3.14.0" />
Expand Down

0 comments on commit 97aa623

Please sign in to comment.