aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryipstanley <stanley_yip@brown.edu>2019-07-03 13:40:32 -0400
committeryipstanley <stanley_yip@brown.edu>2019-07-03 13:40:32 -0400
commit88cec4b18b8e49f8598cab817955ca4dccb6228c (patch)
treeae73d5243a65fc9c5785f481ec7eaf378fe09564
parent226ef5557464f7d446e3bf36d592b85990e41a87 (diff)
pdf keys error
-rw-r--r--src/client/views/pdf/PDFViewer.tsx5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/views/pdf/PDFViewer.tsx b/src/client/views/pdf/PDFViewer.tsx
index ad062a54d..8af29110f 100644
--- a/src/client/views/pdf/PDFViewer.tsx
+++ b/src/client/views/pdf/PDFViewer.tsx
@@ -432,7 +432,7 @@ export class Viewer extends React.Component<IViewerProps> {
}
renderAnnotation = (anno: Doc, index: number): JSX.Element => {
- return <Annotation anno={anno} index={index} parent={this} />;
+ return <Annotation anno={anno} index={index} parent={this} key={`${anno[Id]}-annotation`} />;
}
@action
@@ -636,7 +636,8 @@ export class Viewer extends React.Component<IViewerProps> {
}
}
return true;
- }).sort((a: Doc, b: Doc) => NumCast(a.y) - NumCast(b.y)).map((anno: Doc, index: number) => this.renderAnnotation(anno, index))}
+ }).sort((a: Doc, b: Doc) => NumCast(a.y) - NumCast(b.y))
+ .map((anno: Doc, index: number) => this.renderAnnotation(anno, index))}
</div>
</div>
<div className="pdfViewer-overlayCont" onPointerDown={(e) => e.stopPropagation()}