fix(transaction): fix nil pointer
All checks were successful
Build Docker Image / Build-Docker-Image (push) Successful in 5m13s
Build and Push Docker Image / Build-And-Push-Docker-Image (push) Successful in 5m38s

This commit was merged in pull request #118.
This commit is contained in:
2025-05-19 20:18:18 +02:00
parent 7a691ec263
commit 3c6fd72d85

View File

@@ -30,7 +30,7 @@ templ Transaction(items templ.Component, filter types.TransactionItemsFilter, ac
if parent.ParentId == nil { if parent.ParentId == nil {
<optgroup label={ parent.Name }> <optgroup label={ parent.Name }>
for _, child := range treasureChests { for _, child := range treasureChests {
if *child.ParentId == parent.Id { if child.ParentId != nil && *child.ParentId == parent.Id {
<option <option
value={ child.Id.String() } value={ child.Id.String() }
selected?={ filter.TreasureChestId == child.Id.String() } selected?={ filter.TreasureChestId == child.Id.String() }