summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/assets/javascripts/repo/components/repo_commit_section.vue3
-rw-r--r--app/assets/javascripts/repo/index.js3
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) {