Commit e05d0679 authored by Natalia Tepluhina's avatar Natalia Tepluhina

Merge branch 'ph/211585/fixWhitespaceToggleNotShowingCorrectDiff' into 'master'

Fixed whitespace toggle not showing the correct diff

Closes #211585

See merge request gitlab-org/gitlab!29139
parents 2e147c78 fc35125e
......@@ -326,6 +326,7 @@ export default {
},
[types.SET_SHOW_WHITESPACE](state, showWhitespace) {
state.showWhitespace = showWhitespace;
state.diffFiles = [];
},
[types.TOGGLE_FILE_FINDER_VISIBLE](state, visible) {
state.fileFinderVisible = visible;
......
---
title: Fixed whitespace toggle not showing the correct diff
merge_request:
author:
type: fixed
......@@ -796,11 +796,13 @@ describe('DiffsStoreMutations', () => {
it('sets showWhitespace', () => {
const state = {
showWhitespace: true,
diffFiles: ['test'],
};
mutations[types.SET_SHOW_WHITESPACE](state, false);
expect(state.showWhitespace).toBe(false);
expect(state.diffFiles).toEqual([]);
});
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment