Skip to content

Commit c88a309

Browse files
committed
use null coalesce operator
1 parent 635fe3d commit c88a309

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Pages/Error.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<h1 class="text-danger">Error.</h1>
1919
<h2 class="text-danger">An error occurred while processing your request.</h2>
2020

21-
@if (Model?.ShowRequestId == true)
21+
@if (Model?.ShowRequestId ?? false)
2222
{
2323
<p>
2424
<strong>Request ID:</strong> <code>@Model.RequestId</code>

src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Server/Pages/Error.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<h1 class="text-danger">Error.</h1>
1919
<h2 class="text-danger">An error occurred while processing your request.</h2>
2020

21-
@if (Model?.ShowRequestId == true)
21+
@if (Model?.ShowRequestId ?? false)
2222
{
2323
<p>
2424
<strong>Request ID:</strong> <code>@Model.RequestId</code>

src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Pages/Error.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<h1 class="text-danger">Error.</h1>
88
<h2 class="text-danger">An error occurred while processing your request.</h2>
99

10-
@if (Model?.ShowRequestId == true)
10+
@if (Model?.ShowRequestId ?? false)
1111
{
1212
<p>
1313
<strong>Request ID:</strong> <code>@Model.RequestId</code>

src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/Views/Shared/Error.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<h1 class="text-danger">Error.</h1>
77
<h2 class="text-danger">An error occurred while processing your request.</h2>
88

9-
@if (Model?.ShowRequestId == true)
9+
@if (Model?.ShowRequestId ?? false)
1010
{
1111
<p>
1212
<strong>Request ID:</strong> <code>@Model.RequestId</code>

src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/Views/Shared/Error.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<h1 class="text-danger">Error.</h1>
88
<h2 class="text-danger">An error occurred while processing your request.</h2>
99

10-
@if (Model?.ShowRequestId == true)
10+
@if (Model?.ShowRequestId ?? false)
1111
{
1212
<p>
1313
<strong>Request ID:</strong> <code>@Model.RequestId</code>

src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Pages/Error.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<h1 class="text-danger">Error.</h1>
88
<h2 class="text-danger">An error occurred while processing your request.</h2>
99

10-
@if (Model?.ShowRequestId == true)
10+
@if (Model?.ShowRequestId ?? false)
1111
{
1212
<p>
1313
<strong>Request ID:</strong> <code>@Model.RequestId</code>

src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/Pages/Error.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<h1 class="text-danger">Error.</h1>
88
<h2 class="text-danger">An error occurred while processing your request.</h2>
99

10-
@if (Model?.ShowRequestId == true)
10+
@if (Model?.ShowRequestId ?? false)
1111
{
1212
<p>
1313
<strong>Request ID:</strong> <code>@Model.RequestId</code>

0 commit comments

Comments
 (0)