Skip to content
Snippets Groups Projects
Commit 2e49a8ee authored by Moritz Langenstein's avatar Moritz Langenstein
Browse files

(ml5717) Fixed interval sort comparitor

parent 4eff8c01
No related branches found
No related tags found
No related merge requests found
......@@ -107,6 +107,7 @@ const ensurePathGroupElem = (id) => {
}
groupElem.innerHTML = ""
return groupElem
}
......
......@@ -103,7 +103,7 @@ function overlaps([s1, e1], [, e2]) {
function mergeIntervals(...intervals) {
if (!intervals.length) return []
const sorted = intervals.sort(([a], [b]) => a > b)
const sorted = intervals.sort(([a], [b]) => a - b)
const stack = [sorted[0]]
sorted.forEach((x) => {
const top = stack[stack.length - 1]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment