Skip to content

Exit early if argument is `null`

Paul Gascou-Vaillancourt requested to merge null-top-items into master

What does this MR do and why?

This makes the getTopFrequentItems a bit more robust by handling null items that can be passed when the local storage doesn't contain any frequently visited projects or groups. Technically, this likely didn't cause any user-facing issue as the UI logic was wrapped within a try/catch anyways, but this should stop some errors from being logged to Sentry.

Re https://new-sentry.gitlab.net/organizations/gitlab/issues/56040

Screenshots or screen recordings

No visual change

How to set up and validate locally

  1. Enable the new navigation.
  2. Delete <username>/frequent-[groups|projects] from your local storage.
  3. Browse through the app.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading