aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2021-10-01 13:32:08 -0400
committerbobzel <zzzman@gmail.com>2021-10-01 13:32:08 -0400
commit574a5a676de1ddfb4c215e5ea2ba527b0c940712 (patch)
tree9274113446d085681b135db94521425ee3636b63
parentd4c435da7f4c291b444c2a7da9afa195c5f0dcac (diff)
fixed crash / errors with comparison box
-rw-r--r--src/client/views/nodes/ComparisonBox.scss1
-rw-r--r--src/client/views/nodes/ComparisonBox.tsx2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/nodes/ComparisonBox.scss b/src/client/views/nodes/ComparisonBox.scss
index 44cf5d046..660045a6f 100644
--- a/src/client/views/nodes/ComparisonBox.scss
+++ b/src/client/views/nodes/ComparisonBox.scss
@@ -6,6 +6,7 @@
position: relative;
z-index: 0;
pointer-events: none;
+ display: flex;
.clip-div {
position: absolute;
diff --git a/src/client/views/nodes/ComparisonBox.tsx b/src/client/views/nodes/ComparisonBox.tsx
index 72c7e4f45..15c33c8bf 100644
--- a/src/client/views/nodes/ComparisonBox.tsx
+++ b/src/client/views/nodes/ComparisonBox.tsx
@@ -89,7 +89,7 @@ export class ComparisonBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatabl
};
const displayDoc = (which: string) => {
var whichDoc = Cast(this.dataDoc[which], Doc, null);
- if (whichDoc.type === DocumentType.MARKER) whichDoc = Cast(whichDoc.annotationOn, Doc, null);
+ if (whichDoc?.type === DocumentType.MARKER) whichDoc = Cast(whichDoc.annotationOn, Doc, null);
return whichDoc ? <>
<DocumentView {...OmitKeys(this.props, ["NativeWidth", "NativeHeight"]).omit}
isContentActive={returnFalse}