First person movement tutorial not updating direction properly

Hi, I see a problem in the first person movement tutorial here:
https://developer.playcanvas.com/en/tutorials/first-person-movement/

… that the look direction jumps back to start every ?90 deg or so (when look speed is high).