JavaScript Calculator test 14 not passing

I can’t get test 14 to pass even though it seems to be working.

14. Pressing an operator immediately following “=” should start a new calculation that operates on the result of the previous evaluation

Here’s the error I get:
SyntaxError: “0”-prefixed octal literals and octal escape sequences are deprecated…

Here’s a link to my project:
https://codepen.io/marcods/pen/ZPOYLK

Anyone know what’s going on?

One thing that comes to mind is that setState() is asynchronous, i.e. stuff in if statements probably operate on the old state values.