Skip to content

Commit 4eac066

Browse files
committed
remove warning in code example
1 parent beead56 commit 4eac066

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/dab/Aspire.CommunityToolkit.Hosting.DAB.BlazorApp/TrekApiClientClass.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public class TrekApiClientClass(HttpClient httpClient)
99
public async Task<List<Series>> GetSeriesAsync()
1010
{
1111
var result = await httpClient.GetFromJsonAsync<SeriesList>($"api/series");
12-
return result.value;
12+
return result?.value ?? new List<Series>();
1313
}
1414
}
1515

0 commit comments

Comments
 (0)