Closed ankon closed 5 years ago
@ankon What browser are you using? It renders correctly on Firefox, assuming it's due to the implementation of sorting on your particular browser. Would like to be able to reproduce the problem.
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3551.3 Safari/537.36
That is "google-chrome-unstable" on Fedora, from the official repositories.
Hi @ncthbrt, I made a PR on solving this issue at Fix Bug: Table of Contents Lesson Number Unordered #21. Let me know if you have any concern to merge 👍
I had a brief look, but failed to get gatsby develop/serve to work. I suspect that the problem is around here: https://github.com/ncthbrt/nact.io/blob/4ca060208e158b0dea21fcc85aecbf32af54e4cd/src/components/Layout/TableOfContents.jsx#L36 -- instead of using
>
and returning a boolean the compare function for Array.sort should return <0/0/>0 values.