diff options
author | Winnie Hellmann <winnie@gitlab.com> | 2018-11-21 18:20:32 +0300 |
---|---|---|
committer | Winnie Hellmann <winnie@gitlab.com> | 2018-11-27 11:18:48 +0300 |
commit | 0bf740fa324df2971d0f38d4ff814095a2af4c83 (patch) | |
tree | db0fd4ac5b0c08b8bc281d67377f5c9917cffa0c /app/assets/javascripts/diffs/store/modules | |
parent | 8ef51157950366f64cbd41ccf070e1facd104cae (diff) |
Replace `=== true` with `parseBoolean()`
Diffstat (limited to 'app/assets/javascripts/diffs/store/modules')
-rw-r--r-- | app/assets/javascripts/diffs/store/modules/diff_state.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/assets/javascripts/diffs/store/modules/diff_state.js b/app/assets/javascripts/diffs/store/modules/diff_state.js index 085e255f1d3..2f59a3822f4 100644 --- a/app/assets/javascripts/diffs/store/modules/diff_state.js +++ b/app/assets/javascripts/diffs/store/modules/diff_state.js @@ -1,6 +1,7 @@ import Cookies from 'js-cookie'; import { getParameterValues } from '~/lib/utils/url_utility'; import bp from '~/breakpoints'; +import { parseBoolean } from '~/lib/utils/common_utils'; import { INLINE_DIFF_VIEW_TYPE, DIFF_VIEW_COOKIE_NAME, MR_TREE_SHOW_KEY } from '../../constants'; const viewTypeFromQueryString = getParameterValues('view')[0]; @@ -22,7 +23,7 @@ export default () => ({ tree: [], treeEntries: {}, showTreeList: - storedTreeShow === null ? bp.getBreakpointSize() !== 'xs' : storedTreeShow === 'true', + storedTreeShow === null ? bp.getBreakpointSize() !== 'xs' : parseBoolean(storedTreeShow), currentDiffFileId: '', projectPath: '', commentForms: [], |