Skip to content

Add optional chaining when data is undefined

Samantha Ming requested to merge 320836-display-compare-button into master

What does this MR do?

Fix Issue: #320836 (closed)

When we fetch our path, some paths may not have the tags data. And thus when we apply the filter method, it will break. So the solution is ensure we set the returned data as an empty array instead of undefined.

image image

Screenshots (strongly suggested)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Related to #320836 (closed)

Edited by Samantha Ming

Merge request reports