debian-mirror-gitlab/app/assets/javascripts/diffs/utils/diff_line.js
2021-12-11 22:18:48 +05:30

10 lines
204 B
JavaScript

export function pickDirection({ line, code } = {}) {
const { left, right } = line;
let direction = left || right;
if (right?.line_code === code) {
direction = right;
}
return direction;
}