Error when clicking on the homepage logo

I’ve updated my code above.