Skip to content

Commit

Permalink
Prevent ANE when resource state is null (#1977)
Browse files Browse the repository at this point in the history
Ideally we'd make the field nullable on the proto definition, but that's a breaking change at this point. So instead, we pass an empty string.

Other options are discussed in #1930.

Co-authored-by: Drew Noakes <git@drewnoakes.com>
  • Loading branch information
github-actions[bot] and drewnoakes authored Jan 30, 2024
1 parent 142badb commit 564392a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Aspire.Hosting/Dashboard/proto/Partials.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static Resource FromSnapshot(ResourceSnapshot snapshot)
ResourceType = snapshot.ResourceType,
DisplayName = snapshot.DisplayName,
Uid = snapshot.Uid,
State = snapshot.State,
State = snapshot.State ?? "",
};

if (snapshot.CreationTimeStamp.HasValue)
Expand Down

0 comments on commit 564392a

Please sign in to comment.