summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/diffs/index.js
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2018-12-13 10:57:45 +0000
committerPhil Hughes <me@iamphill.com>2018-12-13 10:57:45 +0000
commitee2f3cac35e630cb5d5aef93752e3eb28b6852c2 (patch)
treeecd852085055cc4b8e930644e618d239a9e6887d /app/assets/javascripts/diffs/index.js
parent6b68d82fbf2da3f73d411e7a6fbda16cd3b94604 (diff)
downloadgitlab-ce-ee2f3cac35e630cb5d5aef93752e3eb28b6852c2.tar.gz
Fix diff changes empty state
The empty state now only gets shown when no files exist in the branch. If the user is reviewing 2 versions with no files, we don't show the state. Refactors the diff app spec to use Vue test utils. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/48635
Diffstat (limited to 'app/assets/javascripts/diffs/index.js')
-rw-r--r--app/assets/javascripts/diffs/index.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/assets/javascripts/diffs/index.js b/app/assets/javascripts/diffs/index.js
index 06ef4207d85..915cacb374f 100644
--- a/app/assets/javascripts/diffs/index.js
+++ b/app/assets/javascripts/diffs/index.js
@@ -17,6 +17,7 @@ export default function initDiffsApp(store) {
endpoint: dataset.endpoint,
projectPath: dataset.projectPath,
currentUser: JSON.parse(dataset.currentUserData) || {},
+ changesEmptyStateIllustration: dataset.changesEmptyStateIllustration,
};
},
computed: {
@@ -31,6 +32,7 @@ export default function initDiffsApp(store) {
currentUser: this.currentUser,
projectPath: this.projectPath,
shouldShow: this.activeTab === 'diffs',
+ changesEmptyStateIllustration: this.changesEmptyStateIllustration,
},
});
},