summaryrefslogtreecommitdiff
path: root/app/assets
diff options
context:
space:
mode:
authorJacques Erasmus <jerasmus@gitlab.com>2018-10-29 16:16:40 +0000
committerPhil Hughes <me@iamphill.com>2018-10-29 16:16:40 +0000
commit4508343d16f6b87019b7416248480983414c3fc8 (patch)
tree44a58b5a9915c8c83a46ea8d832c58fdaef3ce39 /app/assets
parent3d4cff1c910d836fffd23652d65d1a8a7b60be04 (diff)
downloadgitlab-ce-4508343d16f6b87019b7416248480983414c3fc8.tar.gz
Fix broken "Show whitespace changes" button on MR "Changes" tab
Diffstat (limited to 'app/assets')
-rw-r--r--app/assets/javascripts/diffs/components/compare_versions.vue12
1 files changed, 6 insertions, 6 deletions
diff --git a/app/assets/javascripts/diffs/components/compare_versions.vue b/app/assets/javascripts/diffs/components/compare_versions.vue
index 9bbf62c0eb6..29b5aff0fb1 100644
--- a/app/assets/javascripts/diffs/components/compare_versions.vue
+++ b/app/assets/javascripts/diffs/components/compare_versions.vue
@@ -40,17 +40,14 @@ export default {
comparableDiffs() {
return this.mergeRequestDiffs.slice(1);
},
- isWhitespaceVisible() {
- return !getParameterValues('w')[0];
- },
toggleWhitespaceText() {
- if (this.isWhitespaceVisible) {
+ if (this.isWhitespaceVisible()) {
return __('Hide whitespace changes');
}
return __('Show whitespace changes');
},
toggleWhitespacePath() {
- if (this.isWhitespaceVisible) {
+ if (this.isWhitespaceVisible()) {
return mergeUrlParams({ w: 1 }, window.location.href);
}
@@ -67,6 +64,9 @@ export default {
'expandAllFiles',
'toggleShowTreeList',
]),
+ isWhitespaceVisible() {
+ return getParameterValues('w')[0] !== '1';
+ },
},
};
</script>
@@ -121,7 +121,7 @@ export default {
</a>
<a
:href="toggleWhitespacePath"
- class="btn btn-default"
+ class="btn btn-default qa-toggle-whitespace"
>
{{ toggleWhitespaceText }}
</a>