Recent observations show that supermassive black holes (BHs) with ~10 9 M exist at redshift z 6. A promising formation channel is the so-called direct collapse model, which posits that a massive seed BH forms through gravitational collapse of a ~10 5 M supermassive star (SMS). We study the evolution of such an SMS growing by rapid mass accretion. In particular, we examine the impact of time-dependent mass accretion of repeating burst and quiescent phases expected to occur with a self-gravitating circumstellar disc. We show that protostars growing via episodic accretion can substantially contract during the quiescent phases, in contrast to the case of constant mass accretion, whereby the star expands roughly monotonically. The stellar effective temperature and ionizing photon emissivity increase accordingly, which can cause strong ionizing feedback and halt the mass accretion. With a fixed duration of the quiescent phase t q , this contraction occurs in early evolutionary phases, i.e. for M * 10 3 M with t q ~= 10 3 yr. For later epochs and larger masses but the same t q , contraction is negligible even during quiescent phases. With larger t q , however, the star continues to contract during quiescent phases even for the higher stellar masses. We show that this behaviour is well understood by comparing the interval time and the thermal relaxation time for a bloated surface layer. We conclude that the feedback becomes effective, if t q 10 3 yr, which is possible in an accretion disc forming in the direct collapse model.