From 2e41c474d7761868214a1ccb00e13dd206af42c3 Mon Sep 17 00:00:00 2001 From: Conrad Chan Date: Thu, 3 Jun 2021 11:03:05 -0700 Subject: [PATCH] fix(video360): Add guard clause for controls.render (#1396) --- src/lib/viewers/media/DashViewer.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/viewers/media/DashViewer.js b/src/lib/viewers/media/DashViewer.js index 987266569..ed2774014 100644 --- a/src/lib/viewers/media/DashViewer.js +++ b/src/lib/viewers/media/DashViewer.js @@ -954,7 +954,10 @@ class DashViewer extends VideoBaseViewer { * @inheritdoc */ renderUI() { - if (!this.controls) { + // Extra guard for `render` is needed because Video360Viewer extends DashViewer + // and creates and assigns the 360 control to this.controls which usually has + // been reserved for new React controls + if (!this.controls || !this.controls.render) { return; }