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 authored Jun 3, 2021
1 parent 7392977 commit cad6bee
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 @@ -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;
}

Expand Down

0 comments on commit cad6bee

Please sign in to comment.