helper/plugin: don't panic in ReadDataSource State

This commit is contained in:
Radek Simko 2018-10-02 21:22:03 +01:00 committed by Martin Atkins
parent 67a8757b69
commit d93b462e9c
1 changed files with 3 additions and 1 deletions

View File

@ -619,7 +619,9 @@ func (s *GRPCProviderServer) ReadDataSource(_ context.Context, req *proto.ReadDa
resp.Diagnostics = convert.AppendProtoDiag(resp.Diagnostics, err)
return resp, nil
}
resp.State.Msgpack = newStateMP
resp.State = &proto.DynamicValue{
Msgpack: newStateMP,
}
return resp, nil
}