summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2018-06-12 10:02:15 +0100
committerPhil Hughes <me@iamphill.com>2018-06-12 10:02:15 +0100
commite1ec70cf8e4ca7964eb12e6d1a911285c57a3892 (patch)
tree071b91a8526027754b99a600944df9194ca8626d
parent39ed07a816c9f732715b835bd363057a315f6ee7 (diff)
downloadgitlab-ce-e1ec70cf8e4ca7964eb12e6d1a911285c57a3892.tar.gz
more karma fixes
-rw-r--r--app/assets/javascripts/ide/components/commit_sidebar/list.vue3
-rw-r--r--app/assets/javascripts/ide/components/commit_sidebar/list_item.vue3
-rw-r--r--app/assets/javascripts/ide/components/repo_commit_section.vue7
3 files changed, 9 insertions, 4 deletions
diff --git a/app/assets/javascripts/ide/components/commit_sidebar/list.vue b/app/assets/javascripts/ide/components/commit_sidebar/list.vue
index c107462e335..5a8566d3121 100644
--- a/app/assets/javascripts/ide/components/commit_sidebar/list.vue
+++ b/app/assets/javascripts/ide/components/commit_sidebar/list.vue
@@ -45,7 +45,8 @@ export default {
},
activeFileKey: {
type: String,
- required: true,
+ required: false,
+ default: null,
},
},
data() {
diff --git a/app/assets/javascripts/ide/components/commit_sidebar/list_item.vue b/app/assets/javascripts/ide/components/commit_sidebar/list_item.vue
index b69a9a833a5..95f332de10d 100644
--- a/app/assets/javascripts/ide/components/commit_sidebar/list_item.vue
+++ b/app/assets/javascripts/ide/components/commit_sidebar/list_item.vue
@@ -32,7 +32,8 @@ export default {
},
activeFileKey: {
type: String,
- required: true,
+ required: false,
+ default: null,
},
},
computed: {
diff --git a/app/assets/javascripts/ide/components/repo_commit_section.vue b/app/assets/javascripts/ide/components/repo_commit_section.vue
index 8ed182ff378..b369531176b 100644
--- a/app/assets/javascripts/ide/components/repo_commit_section.vue
+++ b/app/assets/javascripts/ide/components/repo_commit_section.vue
@@ -32,6 +32,9 @@ export default {
showStageUnstageArea() {
return !!(this.someUncommitedChanges || this.lastCommitMsg || !this.unusedSeal);
},
+ activeFileKey() {
+ return this.activeFile ? this.activeFile.key : null;
+ },
},
watch: {
hasChanges() {
@@ -93,7 +96,7 @@ export default {
action="stageAllChanges"
:action-btn-text="__('Stage all')"
item-action-component="stage-button"
- :active-file-key="activeFile.key"
+ :active-file-key="activeFileKey"
/>
<commit-files-list
icon-name="staged"
@@ -103,7 +106,7 @@ export default {
:action-btn-text="__('Unstage all')"
item-action-component="unstage-button"
:staged-list="true"
- :active-file-key="activeFile.key"
+ :active-file-key="activeFileKey"
/>
</template>
<empty-state