Skip to content

Commit

Permalink
frontend condition fail issue fix in highlight data
Browse files Browse the repository at this point in the history
  • Loading branch information
vishnuszipstack committed Dec 17, 2024
1 parent 871c67d commit 7e7f666
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ function PdfViewer({ fileUrl, highlightData }) {

// Jump to page when highlightData changes
useEffect(() => {
highlightData = removeZerosAndDeleteIfAllZero(highlightData); // Removing zeros before checking the highlight data condition
if (highlightData && highlightData.length > 0) {
highlightData = removeZerosAndDeleteIfAllZero(highlightData);
const pageNumber = highlightData[0][0]; // Assume highlightData[0][0] is the page number
if (pageNumber !== null && jumpToPage) {
setTimeout(() => {
Expand Down

0 comments on commit 7e7f666

Please sign in to comment.