I have a function with the following code:
window.location = window.location.origin;
and I've tried a lot of different ways of doing this, but they all just reload the page with the same link. The odd thing to me is that if I call this function from the console it all works out as it should, so I have no clue to where is the problem.