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

Fix error on reload site click #1041

Merged
merged 1 commit into from
Feb 20, 2024
Merged

Fix error on reload site click #1041

merged 1 commit into from
Feb 20, 2024

Conversation

bgrgicak
Copy link
Collaborator

What is this PR doing?

This PR fixes an error when the Delete stored data and start fresh button is clicked.

What problem is it solving?

It allows users to use the Delete stored data and start fresh checkbox.

How is the problem addressed?

This PR adds a default value false to prevent form errors when the default value is undefined.
It also adds a try/catch around resetVirtualOpfs to ensure Playground doesn't break if resetVirtualOpfs isn't available.

Testing Instructions

  • Checkout this branch
  • Run npm run dev
  • Open Playground
  • In the header select Browser storage and Delete stored data and start fresh
  • Click apply changes
  • Confirm that there were no errors and your site reloaded with the storage=browser query string

Copy link
Collaborator

@adamziel adamziel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thank you!

@adamziel adamziel merged commit c622df9 into trunk Feb 20, 2024
5 checks passed
@adamziel adamziel deleted the fix/storage-switcher branch February 20, 2024 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants