I just finished the calculator app, but I'm getting inconsistent results from onClick

For some reason, I’m getting very inconsistent results with onClick, sometimes the button will register the click, update the state, and display immediately, just as often, it takes two or more clicks for it to register that the button was pressed. I’m pretty puzzled seeing as using the numpad responds perfectly at all times.

If anyone has any suggestions, they’d be much appreciated.

I’ll give you a hint with a question. What is the purpose of using the global flag (g) on the RegExp’s?

I put them there idly; I’m amazed that was the issue, thanks!