Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ui/cluster-ui: prevent returning new obj from session storage every time
When we retrieve from localSettings in db-console, we retrieve in the following order: `localSettings ?? sessionStorage ?? defaultValue` The value from the session storage is retrieved via parsing a JSON string and returning a new object. In the active execution pages, we update the URL search string every time the filters object changes to reflect any filters selected. Due to the local settings behaviour, we could end up in an infinite update loop if we continously read from session storage since a new object was being returned each time (e.g. on a hard refresh). To prevent this, when retrieving a stored value, if it exists in session storage but not local storage, we can set the local setting to be parsed object from session storage. Release note (bug fix): active execution pages will no longer crash if there are no filters set in local settings. Release justification: bug fix
- Loading branch information