Skip to content

Commit

Permalink
Fix undefined variable issue
Browse files Browse the repository at this point in the history
  • Loading branch information
mrtcode committed May 28, 2024
1 parent 461ebf3 commit 4884d58
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/core/module/page-label.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ function getPageWords(chars, viewportRect) {
}

function getClusters(objects, property, eps) {
if (!objects.length) {
return [];
}
// Sort objects based on the specified property
objects.sort((a, b) => a[property] - b[property]);

Expand Down

0 comments on commit 4884d58

Please sign in to comment.