Welcome to mirror list, hosted at ThFree Co, Russian Federation.

diffs_helper.js « helpers « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d2b8cb11fe093cd7aa7f55ae99d7b7ac18cb7eb9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
export function hasInlineLines(diffFile) {
  return diffFile?.highlighted_diff_lines?.length > 0;
}

export function hasParallelLines(diffFile) {
  return diffFile?.parallel_diff_lines?.length > 0;
}

export function isSingleViewStyle(diffFile) {
  return !hasParallelLines(diffFile) || !hasInlineLines(diffFile);
}

export function hasDiff(diffFile) {
  return hasInlineLines(diffFile) || hasParallelLines(diffFile) || !diffFile?.blob?.readable_text;
}