Skip to content

Commit

Permalink
resolve error when rendering saved changelog entries
Browse files Browse the repository at this point in the history
  • Loading branch information
aspriddell committed Feb 20, 2023
1 parent 155fbe3 commit f9511c2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions DragonFruit.Sakura/Administration/Changelogs.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,9 @@ private async Task SaveModification(ApiChangelogModification modification)
: new AdminApiChangelogModificationCreationRequest(Target.AppId, Target.VersionName, modification) as YunaApiRequest;

var newModification = await Client.PerformAsync<ApiChangelogModification>(request).ConfigureAwait(false);
var index = Target.Modifications.IndexOf(modification);

// replace the modification with the populated id copy
Target.Modifications.RemoveAt(index);
Target.Modifications.Insert(index, newModification);
// replace the modification with the new one
Target.Modifications[Target.Modifications.IndexOf(modification)] = newModification;
}

private async ValueTask DeleteModification(ApiChangelogModification modification)
Expand Down

0 comments on commit f9511c2

Please sign in to comment.