Fix possible nil map from State.Load()

pull/175/head
James Mills 2 months ago
parent 7c149128b4
commit 37135ce6af
Signed by: prologic
GPG Key ID: AC4C014F1440EBD6
  1. 4
      state.go

@ -77,5 +77,9 @@ func LoadState(r io.Reader) (*State, error) {
return nil, fmt.Errorf("error reading state: %w", err)
}
if state.Indicies == nil {
state.Indicies = make(map[string]int64)
}
return state, nil
}

Loading…
Cancel
Save