jaltekruse / Free-Math

An offline React web application for managing digital math homework
http://freemathapp.org
71 stars 18 forks source link

Fix assignment recovery with multiple tabs #222

Open mscotch1 opened 1 year ago

mscotch1 commented 1 year ago

Error stemmed from localStorage item being removed in one tab, but the other tab still attempted to load it. Now, there is consistent error checking for a missing item when loading from localStorage.

Recovery items were added to the component's state (as they are used in the rendering process); on failure, recovery items are retrieved from localStorage again so they are up-to-date and user can try loading most recent assignment again.

mscotch1 commented 1 year ago

Fixes #214