From cad6bee8427e863db8b76f3288d841ff7e1fbfe7 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 638af82b2..3d6e28346 100644 --- a/src/lib/viewers/media/DashViewer.js +++ b/src/lib/viewers/media/DashViewer.js @@ -1019,7 +1019,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; }