Skip to content

Commit

Permalink
Use default value when page label is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
mrtcode committed Oct 20, 2023
1 parent 647195f commit 57db414
Showing 1 changed file with 12 additions and 16 deletions.
28 changes: 12 additions & 16 deletions src/common/components/common/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,10 @@ export function PopupPreview(props) {
|| annotation.type === 'text' && <IconText/>
}
</div>
{annotation.pageLabel && (
<div className="page" onDoubleClick={handlePageLabelDoubleClick}>
<div><FormattedMessage id="pdfReader.page"/></div>
<div className="label">{annotation.pageLabel}</div>
</div>
)}
<div className="page" onDoubleClick={handlePageLabelDoubleClick}>
<div><FormattedMessage id="pdfReader.page"/></div>
<div className="label">{annotation.pageLabel || '-'}</div>
</div>
</div>
<div className="right">
{annotation.authorName && (
Expand Down Expand Up @@ -273,16 +271,14 @@ export function SidebarPreview(props) {
|| annotation.type === 'text' && <IconText/>
}
</div>
{annotation.pageLabel && (
<div
className="page"
onClick={handlePageLabelClick}
onDoubleClick={handlePageLabelDoubleClick}
>
<div><FormattedMessage id="pdfReader.page"/></div>
<div className="label">{annotation.pageLabel}</div>
</div>
)}
<div
className="page"
onClick={handlePageLabelClick}
onDoubleClick={handlePageLabelDoubleClick}
>
<div><FormattedMessage id="pdfReader.page"/></div>
<div className="label">{annotation.pageLabel || '-'}</div>
</div>
</div>
<div className="right">
{annotation.authorName && (
Expand Down

0 comments on commit 57db414

Please sign in to comment.