diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-20 15:10:29 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-20 15:10:29 +0300 |
commit | 62c78157be8fe8888787162293f13945a5fa5d3e (patch) | |
tree | bcb134ee4b4a543b27341063fc6adb804dc3a3f4 /app/assets/javascripts/ide | |
parent | 063d4b1caa1d04f50b2ba3290376de64dbb5fb07 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/ide')
-rw-r--r-- | app/assets/javascripts/ide/stores/modules/pipelines/actions.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/assets/javascripts/ide/stores/modules/pipelines/actions.js b/app/assets/javascripts/ide/stores/modules/pipelines/actions.js index 9cf8d5a360e..51872993f16 100644 --- a/app/assets/javascripts/ide/stores/modules/pipelines/actions.js +++ b/app/assets/javascripts/ide/stores/modules/pipelines/actions.js @@ -53,9 +53,15 @@ export const receiveLatestPipelineSuccess = ({ rootGetters, commit }, { pipeline commit(types.RECEIVE_LASTEST_PIPELINE_SUCCESS, lastCommitPipeline); }; -export const fetchLatestPipeline = ({ dispatch, rootGetters }) => { +export const fetchLatestPipeline = ({ commit, dispatch, rootGetters }) => { if (eTagPoll) return; + if (!rootGetters.lastCommit) { + commit(types.RECEIVE_LASTEST_PIPELINE_SUCCESS, null); + dispatch('stopPipelinePolling'); + return; + } + dispatch('requestLatestPipeline'); eTagPoll = new Poll({ |