Pass null instead of false to GlButton target

What does this MR do and why?

The upgrade plan header shows a call-to-action button on the subscription page. On SaaS, it should open in a new tab. The component binds :target="isSaas && '_blank'", which is false on self-managed instances. GlButton and GlLink expect the target prop to be a string or null, not boolean.

The warning is: prop "target". Expected String, got Boolean with value false.

Fix: use a ternary that returns '_blank' on SaaS or null on self-managed. Update the jest spec to expect null instead of false.

Changes made:

  • ee/app/assets/javascripts/vue_shared/subscription/components/upgrade_plan_header.vue
  • ee/spec/frontend/vue_shared/subscription/components/upgrade_plan_header_spec.js

How to set up and validate locally

  1. Go to Admin area > Subscription on a self-managed instance without a subscription.
  2. The upgrade CTA should open in the same tab when clicked.
  3. Check the browser console shows no [Vue warn] line for this warning.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

References

🤖 Generated with Claude Code

Edited by Miguel Rincon

Merge request reports

Loading
Loading