Hi all,
I'm unsure if this is a bug, or simply a problem with my implementation. But it certainly took me ages to hunt so I wanted to see what the group said.
I am setting this.app.disable_push_state = true, since I do not want pushState functionality at the moment. However, I was running into a problem where the originally loaded hash would fail to load after several changes. For example:
The second redirect, back to the first page, does not trigger the route. After extensive debugging, I isolated it to the setLocation function. The function is fired but no redirect ever happens.
If I change the line
return (window.location = new_location);
to
return (window.location.hash = new_location);
then everything starts working beautifully. So my question, is this a bug with Sammy, or is there something wrong with my implementation? I certainly can't find anything wrong, but I also don't know much about redirecting hashes so perhaps something is incorrect?
Thanks,
-Zach