aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/PDFBox.tsx
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2019-08-04 01:17:29 -0400
committerBob Zeleznik <zzzman@gmail.com>2019-08-04 01:17:29 -0400
commit02346eabdefd428ca23d6a3fbefdcd51ef62b738 (patch)
treeb5b6eb3a124c9f7b1d9da2aa762e2726825bd84d /src/client/views/nodes/PDFBox.tsx
parentbbca58e2ff087bbd4bb2ee12e6c4567e146450e3 (diff)
fixed errors/warnings
Diffstat (limited to 'src/client/views/nodes/PDFBox.tsx')
-rw-r--r--src/client/views/nodes/PDFBox.tsx4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/client/views/nodes/PDFBox.tsx b/src/client/views/nodes/PDFBox.tsx
index fa072aecf..a49709e83 100644
--- a/src/client/views/nodes/PDFBox.tsx
+++ b/src/client/views/nodes/PDFBox.tsx
@@ -152,9 +152,7 @@ export class PDFBox extends DocComponent<FieldViewProps, PdfDocument>(PdfDocumen
}
scrollTo(y: number) {
- if (this._mainCont.current) {
- this._mainCont.current.scrollTo({ top: Math.max(y - (this._mainCont.current!.offsetHeight / 2), 0), behavior: "auto" });
- }
+ this._mainCont.current && this._mainCont.current.scrollTo({ top: Math.max(y - (this._mainCont.current.offsetHeight / 2), 0), behavior: "auto" });
}
settingsPanel() {