Skip to content

`TypeError: Cannot read properties of undefined` in MR edit/create page

Summary

In the MR edit/create page, the following error is logged to the console:

TypeError: Cannot read properties of undefined (reading 'headerLevel')

This seems to originate from GlAccordion which attempts to provide some properties to its children. For some reason, it looks like this is undefined at some point in the lifecycle.

The parent component is ee/app/assets/javascripts/approvals/components/mr_edit/app.vue.

This looks similar to a bug that affected GlFilteredSearch: gitlab-ui!2019 (merged).

At first glane this error doesn't seem to be affecting the UX in any way, so it just looks bad that an error is being logged.

Steps to reproduce

Edit any MR with the browser's console open.

Example Project

Any project.

What is the current bug behavior?

Error logged to the console.

What is the expected correct behavior?

No error.

Relevant logs and/or screenshots

Screen_Shot_2021-10-18_at_11.11.09_AM

Possible fixes

If this is the same bug as in gitlab-ui!2019 (merged), we might want to look into implementing a similar fix in GitLab UI.

Edited by Paul Gascou-Vaillancourt