Fix empty state snapshots

This commit is contained in:
Neil Alexander 2021-04-15 09:18:43 +01:00
parent a799847070
commit b7cf702a14
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
4 changed files with 5 additions and 9 deletions

View file

@ -99,6 +99,7 @@ func (s *stateStatements) BulkSelectState(
if err = rows.Scan(&stateNID, &eventNIDs); err != nil {
return nil, err
}
results[types.StateSnapshotNID(stateNID)] = []types.EventNID{}
for _, id := range eventNIDs {
results[types.StateSnapshotNID(stateNID)] = append(
results[types.StateSnapshotNID(stateNID)],