diff options
author | Jacob Schatz <jschatz1@gmail.com> | 2017-10-12 21:11:10 -0400 |
---|---|---|
committer | Jacob Schatz <jschatz1@gmail.com> | 2017-10-12 21:11:10 -0400 |
commit | ba7bf05ebc57be2f7db834e353e6f6f6327ace93 (patch) | |
tree | 4813ae9cd97226c129a46f1feb306ccb02f34113 | |
parent | 1d790ab95e0cca7e2e248c8c66af01018e111bdc (diff) | |
download | gitlab-ce-reject-push-simplier.tar.gz |
Solve static analysis problems.reject-push-simplier
-rw-r--r-- | app/assets/javascripts/repo/components/repo_commit_section.vue | 3 | ||||
-rw-r--r-- | app/assets/javascripts/repo/index.js | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/app/assets/javascripts/repo/components/repo_commit_section.vue b/app/assets/javascripts/repo/components/repo_commit_section.vue index 0a504ced4fe..9868478978a 100644 --- a/app/assets/javascripts/repo/components/repo_commit_section.vue +++ b/app/assets/javascripts/repo/components/repo_commit_section.vue @@ -69,13 +69,12 @@ export default { }, tryCommit(e, skipBranchCheck = false, newBranch = false) { - if (skipBranchCheck) { this.makeCommit(newBranch); } else { Service.branchSingle() .then((data) => { - Store.setBranchHash(data) + Store.setBranchHash(data); if (Store.branchChanged) { Store.showBranchChangeDialog = true; this.$emit('showBranchChangeDialog:enabled'); diff --git a/app/assets/javascripts/repo/index.js b/app/assets/javascripts/repo/index.js index f2e86384fb5..0e029ccaf3f 100644 --- a/app/assets/javascripts/repo/index.js +++ b/app/assets/javascripts/repo/index.js @@ -37,6 +37,9 @@ function setInitialStore(dataset) { Store.checkIsCommitable(); Service.branchSingle() .then(Store.setBranchHash); + .catch(() => { + Flash('There was a problem initializing the repo editor.'); + }); } function initRepo(el) { |