Exit early if argument is `null`
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
- Enable the new navigation.
- Delete
<username>/frequent-[groups|projects]
from your local storage. - 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.
-
I have evaluated the MR acceptance checklist for this MR.