Negative line height breaks page when loading from state
I found this bug and I think I know how to solve it aswell.
How to reproduce
I would recommend you reproduce this error on Firefox as it is easier to fix but I have also reproduced it on Chrome:
- Go to the demo page of this project.
- Reset your accessibility options and decrease the line height by 1 to make it negative.
- Refresh the page.
The page should now be in an infinite loading state. Using firefox you can simply wait until the browser gives you a prompt to kill the running process and delete your local storage via the dev tools. On Chrome the easiest way I think is to disable JS for the site and clear the local storage once you can actually load the page.
How to fix
I can't really test it myself and provide a pull request sadly (sorry about that) but I think the fix should be straight forward:
In this line of code I think it should be this:
while (lineHeight++) {
like it is for the other options (like textSpace above).
Sorry for not simply providing a pull request and I hope this issue is understandable and you can work with the information given. I you have any further questions or problems reproducing let me know.
@calcifer63 Thank you for letting me know. The bug was fixed.