TypeError when opening a merge request as admin without being a project member

Ran into a bug: TypeError when opening a merge request as admin without being a project member
The merge request widget keeps being in the loading state (moving grey text placeholders) and in the developer tools console the following error is displayed:

TypeError: Cannot read property 'toLowerCase' of null
    at Tn.<anonymous> (mr_widget_options.vue?32c4:1)
    at Tn.t._render (vue.esm.js:3557)
    at Tn.r (vue.esm.js:4075)
    at mn.get (vue.esm.js:4488)
    at mn.run (vue.esm.js:4563)
    at pn (vue.esm.js:4319)
    at Array.<anonymous> (vue.esm.js:1989)
    at Qt (vue.esm.js:1915)

Looking at the code reveals that humanAccess is not set, which leads to the solution to add the current user as a member of the project or group. This is likely only relevant for the admin user.

1 Like