diff options
author | Sam Wilkins <samwilkins333@gmail.com> | 2020-05-18 17:28:47 -0700 |
---|---|---|
committer | Sam Wilkins <samwilkins333@gmail.com> | 2020-05-18 17:28:47 -0700 |
commit | 6e71c311ed04300698365a367c1e13d9246d52d7 (patch) | |
tree | a041fa1b1d9d7987eab63e028838fa602fe1c9d2 /src | |
parent | a0f2d091ad8918ba40592a6f89fb4021df7342bc (diff) |
added null check
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/nodes/VideoBox.tsx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/client/views/nodes/VideoBox.tsx b/src/client/views/nodes/VideoBox.tsx index 6ec48ca89..f75a4c529 100644 --- a/src/client/views/nodes/VideoBox.tsx +++ b/src/client/views/nodes/VideoBox.tsx @@ -124,7 +124,7 @@ export class VideoBox extends ViewBoxAnnotatableComponent<FieldViewProps, VideoD timecode: this.layoutDoc.currentTimecode }).then(response => { this.props.removeDocument?.(b); - this.createRealSummaryLink(response.accessPaths.agnostic.client); + this.createRealSummaryLink(response?.accessPaths?.agnostic?.client); }); } else { //convert to desired file format @@ -135,7 +135,10 @@ export class VideoBox extends ViewBoxAnnotatableComponent<FieldViewProps, VideoD } } - private createRealSummaryLink = (relative: string) => { + private createRealSummaryLink = (relative: string | undefined) => { + if (!relative) { + return; + } const url = this.choosePath(Utils.prepend(relative)); const width = (this.layoutDoc._width || 0); const height = (this.layoutDoc._height || 0); |