Skip to content

Commit

Permalink
fix(video360): Add guard clause for controls.render (#1396)
Browse files Browse the repository at this point in the history
  • Loading branch information
Conrad Chan committed Jun 3, 2021
1 parent 110525a commit 2e41c47
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib/viewers/media/DashViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 2e41c47

Please sign in to comment.