JavaScript Calculator displays an incorrect formula

I have found that the application [ https://www.freecodecamp.org/learn/front-end-development-libraries/front-end-development-libraries-projects/build-a-javascript-calculator],[ https://javascript-calculator.freecodecamp.rocks/ ] has a bug:

input:

+0+0+0+0+0+0+-1

The bug (red rectangle added by me):