Skip to content

Fix type error in initHeaderSearchApp

Summary

Upon a routine check of the sentry logs, I found that one of the methods in the header is generating quite a few errors. These errors are not a show-stopper but it would be good to find a root cause.

log: https://new-sentry.gitlab.net/organizations/gitlab/issues/1638/?project=4&query=is%3Aunresolved+search&statsPeriod=14d

Steps to reproduce

I don't know. So far I was not able to reproduce it.

What is the current bug behavior?

Under some (currently unknown) circumstances, the js-header-search element doesn't have dataset property in DOM.

What is the expected correct behavior?

The js-header-search element does have dataset property in DOM.

Relevant logs and/or screenshots

https://new-sentry.gitlab.net/organizations/gitlab/issues/1638/?project=4&query=is%3Aunresolved+search&statsPeriod=14d

Possible fixes