diff --git a/src/assets/javascripts/components/toc/index.ts b/src/assets/javascripts/components/toc/index.ts index a682aec87..02642fc5e 100644 --- a/src/assets/javascripts/components/toc/index.ts +++ b/src/assets/javascripts/components/toc/index.ts @@ -162,9 +162,7 @@ export function watchTableOfContents( }), /* Sort index by vertical offset (see https://bit.ly/30z6QSO) */ - map(index => new Map([...index] - .sort(([, a], [, b]) => a - b) - )), + map(index => new Map([...index].sort(([, a], [, b]) => a - b))), /* Re-compute partition when viewport offset changes */ switchMap(index => combineLatest([adjust$, viewport$])