aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/pdf/PDFViewer.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-08-13 07:59:09 -0400
committerbobzel <zzzman@gmail.com>2020-08-13 07:59:09 -0400
commit75dc5eb094bbac18310d4be49529743eb051789c (patch)
treec8b06e73b075f6a9c58f824a50036948b18b23c7 /src/client/views/pdf/PDFViewer.tsx
parent2583d4cd4b8a5f8b3acc3c0e0970adf295d4d8c5 (diff)
parent2d3f72210df626f099379f2f2c6e47fb1d415d82 (diff)
Merge branch 'master' into acls_uv
Diffstat (limited to 'src/client/views/pdf/PDFViewer.tsx')
-rw-r--r--src/client/views/pdf/PDFViewer.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/pdf/PDFViewer.tsx b/src/client/views/pdf/PDFViewer.tsx
index cca86adb5..f9ae78778 100644
--- a/src/client/views/pdf/PDFViewer.tsx
+++ b/src/client/views/pdf/PDFViewer.tsx
@@ -399,10 +399,10 @@ export class PDFViewer extends ViewBoxAnnotatableComponent<IViewerProps, PdfDocu
@action
search = (searchString: string, fwd: boolean, clear: boolean = false) => {
if (clear) {
- this._pdfViewer.findController.executeCommand('reset', { query: "" });
+ this._pdfViewer?.findController.executeCommand('reset', { query: "" });
} else if (!searchString) {
fwd ? this.nextAnnotation() : this.prevAnnotation();
- } else if (this._pdfViewer.pageViewsReady) {
+ } else if (this._pdfViewer?.pageViewsReady) {
this._pdfViewer.findController.executeCommand('findagain', {
caseSensitive: false,
findPrevious: !fwd,