Open dmnsgn opened 3 years ago
Could it be that the /fruits#calories
hashtag part is unhandled by my defined route above?
I am hitting the following infinite loop when clicking on an anchor that changes the hastag.
Uncaught RangeError: Maximum call stack size exceeded.
at Page.unhandled (page.js:1056)
at nextEnter (page.js:712)
at eval (page.js:1183)
at nextEnter (page.js:713)
at eval (page.js:1183)
at nextEnter (page.js:713)
at eval (page.js:1183)
at nextEnter (page.js:713)
at eval (page.js:1183)
at nextEnter (page.js:713)
And also the following line is only taking into account window.location.search
and not window.location.hash
?
https://github.com/visionmedia/page.js/blob/4f9991658f9b9e3de9b6059bade93693af24d6bd/index.js#L643
If you are calling page.stop()
and page.start()
, it may be because there is a bug in page.start()
that doesn't set this._running = true;
if you specified {dispatch: false}
Please see lines 551 and 552 of page.js.
Line 552 should have been put before line 551, or at the very least there should have been a way to set it to true.
I had to modify page.js for my website to work properly, but fortunately it was easy to modify.
I'm not sure I exactly understand your problem, but perhaps you can look at this answer and see if it applies.
Setup
Two routes will render different pages:
Problem
If on page
/fruits/banana#calories
you click on a link href"/veggies/tomato"
(no other attribute), the page will reload. No problem with either/fruits/banana#
or/fruits/banana
. Sounds like an issue with handling hash?