debian-mirror-gitlab/app/assets/javascripts/diffs/utils/diff_line.js

11 lines
204 B
JavaScript
Raw Normal View History

2021-12-11 22:18:48 +05:30
export function pickDirection({ line, code } = {}) {
const { left, right } = line;
let direction = left || right;
if (right?.line_code === code) {
direction = right;
}
return direction;
}