Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resize localStorage array to accomodate for new questions #23

Closed
seanprashad opened this issue Jun 6, 2020 · 1 comment · Fixed by #35
Closed

Resize localStorage array to accomodate for new questions #23

seanprashad opened this issue Jun 6, 2020 · 1 comment · Fixed by #35
Labels

Comments

@seanprashad
Copy link
Owner

seanprashad commented Jun 6, 2020

Currently, if new questions are added here, then any user who visited the site prior to the addition will not be able to use the checkbox to mark off new questions as the array in their local storage won't have indexes for the new questions (ie. it will be short).

We should account for this and update the initialization to handle if the localStorage array already exists and differs in size, then we should create a new array, copy over the old values, and save it over the existing array.

@seanprashad
Copy link
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant