diff options
Diffstat (limited to 'app/assets/javascripts/diffs/store/utils.js')
-rw-r--r-- | app/assets/javascripts/diffs/store/utils.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/assets/javascripts/diffs/store/utils.js b/app/assets/javascripts/diffs/store/utils.js index 4ca353333b7..68536d36ac0 100644 --- a/app/assets/javascripts/diffs/store/utils.js +++ b/app/assets/javascripts/diffs/store/utils.js @@ -140,6 +140,7 @@ export function getFormData(params) { linePosition, positionType, lineRange, + showWhitespace, } = params; const position = JSON.stringify({ @@ -156,6 +157,7 @@ export function getFormData(params) { width: params.width, height: params.height, line_range: lineRange, + ignore_whitespace_change: !showWhitespace, }); const postData = { @@ -486,9 +488,8 @@ export const getDiffMode = (diffFile) => { const diffModeKey = Object.keys(diffModes).find((key) => diffFile[`${key}_file`]); return ( diffModes[diffModeKey] || - (diffFile.viewer && - diffFile.viewer.name === diffViewerModes.mode_changed && - diffViewerModes.mode_changed) || + (diffFile.viewer?.name === diffViewerModes.mode_changed && diffViewerModes.mode_changed) || + (diffFile.viewer?.name === diffViewerModes.no_preview && diffViewerModes.no_preview) || diffModes.replaced ); }; |