Observations of electron density during a solar flare