Skip to content

Commit

Permalink
Prevent ANE when resource state is null (#1975)
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.
  • Loading branch information
drewnoakes authored Jan 30, 2024
1 parent d8e56ac commit e05516d
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 e05516d

Please sign in to comment.