Skip to content

Commit

Permalink
Resolve outline item destination to position
Browse files Browse the repository at this point in the history
  • Loading branch information
mrtcode committed Nov 22, 2024
1 parent 820effc commit 5299512
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/core/module/outline-reader.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ export async function getExistingOutline(pdfDocument, structuredCharsProvider) {
// Disable sortIndex calculation because 2 we aren't using it yet,
// and it causes significant slowdown for document with many papers
// newItem.sortIndex = await getSortIndexFromTitle(pdfDocument, structuredCharsProvider, item.title, item.dest);
newItem.location = {
dest: item.dest,
};
let position = await getPositionFromDestination(pdfDocument, item.dest);
if (position) {
newItem.location = { position };
}
} else if (item.unsafeUrl) {
newItem.url = item.unsafeUrl;
}
Expand Down

0 comments on commit 5299512

Please sign in to comment.