Skip to content

Fix error on reload site click - #1041

Merged
adamziel merged 1 commit into
trunkfrom
fix/storage-switcher
Feb 20, 2024
Merged

Fix error on reload site click#1041
adamziel merged 1 commit into
trunkfrom
fix/storage-switcher

Conversation

@bgrgicak

Copy link
Copy Markdown
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

@adamziel adamziel left a comment

Copy link
Copy Markdown
Collaborator

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
@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

2 participants