In this note the two dimensional Dirac operator $A_eta$ with an electrostatic $delta$-shell interaction of strength $etainmathbb R$ supported on a straight line is studied. We observe a spectral transition in the sense that for the critical interaction strengths $eta=pm 2$ the continuous spectrum of $A_eta$ inside the spectral gap of the free Dirac operator $A_0$ collapses abruptly to a single point.