Uploaded image for project: 'OpenShift Console'
  1. OpenShift Console
  2. CONSOLE-4354

Wrap localstorage in `try` and `catch` statement to prevent runtime error

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • None
    • Admin Screens
    • None
    • False
    • None
    • False

      Wrap window.localstorage in `try` and `catch` statement to prevent runtime error if the limit is exceed.

       

       

      A.C.: 

      • Create a custom `useConsoleLocalStorage` hook that expose `localstorage` methods wrapped in `try` and `catch` statement
      • Swap every instance of  the `localstorage` with `useConsoleLocalStorage`

              jhadvig@redhat.com Jakub Hadvig
              cajieh Cyril Ajieh
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: