Fix epic ancestors widget not displaying content
What does this MR do and why?
The epic ancestors widget is not displaying its content. Related to #436575 (closed).
An example as reported in https://gitlab.slack.com/archives/CETG54GQ0/p1703262525967359: &12153 (closed)
The cause is a missing null check in one of the methods used in the issuable apollo client's cache configuration:
// app/assets/javascripts/graphql_shared/issuable_client.js#161
EpicConnection: {
merge(existing = { nodes: [] }, incoming, { args }) {
- if (!args.after) {
+ if (!args?.after) {
!139622 (merged) seems to have refactored the same code last week.
Screenshots or screen recordings
Before | After |
---|---|
How to set up and validate locally
-
Create three epics A, B, C
-
Add B as the child epic to A
-
Add C as the child epic to B.
-
Visit C and confirm you can see A and B in the ancestors widget in the sidebar.
-
Visit B and confirm you can see A as the ancestor epic in the sidebar.
Edited by euko