Commit f2479e19 authored by Filipa Lacerda's avatar Filipa Lacerda

Prevents empty button in jobs empty state

Returns `null` instead of an empty object to make
sure Vue doesn't render the button
parent 63b4b4b2
......@@ -42,7 +42,7 @@ export const emptyStateIllustration = state =>
(state.job && state.job.status && state.job.status.illustration) || {};
export const emptyStateAction = state =>
(state.job && state.job.status && state.job.status.action) || {};
(state.job && state.job.status && state.job.status.action) || null;
export const isScrollingDown = state => isScrolledToBottom() && !state.isTraceComplete;
......
---
title: Prevent empty button being rendered in empty state
merge_request:
author:
type: fixed
......@@ -84,6 +84,7 @@ describe('Empty State', () => {
vm = mountComponent(Component, {
...props,
content,
action: null,
});
expect(vm.$el.querySelector('.js-job-empty-state-action')).toBeNull();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment