Formatting

This commit is contained in:
squidfunk
2021-03-12 15:15:41 +01:00
parent fe9a86cb41
commit 393e05cc0a
4 changed files with 8 additions and 10 deletions

View File

@@ -161,11 +161,9 @@ export function watchTableOfContents(
}, new Map<HTMLAnchorElement[], number>())
}),
/* Sort index by vertical offset */
map(index => (
new Map<HTMLAnchorElement[], number>(
[...index].sort(([, offsetA], [, offsetB]) => offsetA - offsetB)
)
/* Sort index by vertical offset (see https://bit.ly/30z6QSO) */
map(index => new Map([...index]
.sort(([, a], [, b]) => a - b)
)),
/* Re-compute partition when viewport offset changes */