1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

fix: nil pointer dereference

chore: allow to share labels publicly on settings page
This commit is contained in:
Ferdinand Mütsch
2021-06-12 09:12:28 +02:00
parent 0d64858721
commit 628ea0b9dd
4 changed files with 39 additions and 21 deletions

View File

@ -136,7 +136,10 @@ func (s *Summary) FillMissing() {
}
// construct dummy item for all missing types
presentType, _ := s.findFirstPresentType()
presentType, err := s.findFirstPresentType()
if err != nil {
return // all types are either zero or missing entirely, nothing to fill
}
for _, t := range missingTypes {
s.FillBy(presentType, t)
}