diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2018-10-12 16:26:04 +0100 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2018-10-12 16:26:04 +0100 |
commit | 85c30d742cec72466389a77a2df8d42e3c0075d7 (patch) | |
tree | 7767326e049637ae399ca2b2d2a198d4e70cde60 /app/assets/javascripts/jobs | |
parent | fbec87b4b578f048408d4b969ad8db3f3a51f22e (diff) | |
download | gitlab-ce-85c30d742cec72466389a77a2df8d42e3c0075d7.tar.gz |
Updates the check for started in job header
The function that was checking if the job was started or not
was expecting a boolean, however it was receiving a null.
During the refactor the condition was changed, causing the function
to break with null
This commit fixes the check
Diffstat (limited to 'app/assets/javascripts/jobs')
-rw-r--r-- | app/assets/javascripts/jobs/components/job_app.vue | 4 | ||||
-rw-r--r-- | app/assets/javascripts/jobs/store/getters.js | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/app/assets/javascripts/jobs/components/job_app.vue b/app/assets/javascripts/jobs/components/job_app.vue index acf91e2e9ed..4e8d3ad24cc 100644 --- a/app/assets/javascripts/jobs/components/job_app.vue +++ b/app/assets/javascripts/jobs/components/job_app.vue @@ -30,7 +30,7 @@ 'headerActions', 'headerTime', 'shouldRenderCalloutMessage', - 'jobHasStarted', + 'shouldRenderTriggeredLabel', 'hasEnvironment', 'isJobStuck', 'hasTrace', @@ -58,7 +58,7 @@ :user="job.user" :actions="headerActions" :has-sidebar-button="true" - :should-render-triggered-label="jobHasStarted" + :should-render-triggered-label="shouldRenderTriggeredLabel" :item-name="__('Job')" /> </div> diff --git a/app/assets/javascripts/jobs/store/getters.js b/app/assets/javascripts/jobs/store/getters.js index afe5f88b292..9f4f372e3d2 100644 --- a/app/assets/javascripts/jobs/store/getters.js +++ b/app/assets/javascripts/jobs/store/getters.js @@ -22,10 +22,10 @@ export const shouldRenderCalloutMessage = state => !_.isEmpty(state.job.status) && !_.isEmpty(state.job.callout_message); /** - * When job has not started the key will be `false` + * When job has not started the key will be null * When job started the key will be a string with a date. */ -export const jobHasStarted = state => !(state.job.started === false); +export const shouldRenderTriggeredLabel = state => _.isString(state.job.started); export const hasEnvironment = state => !_.isEmpty(state.job.deployment_status); |