Skip to content

Commit

Permalink
fix: correctly check for cardboard button on control bar so we don't …
Browse files Browse the repository at this point in the history
…add two (#26)
  • Loading branch information
brandonocasey authored Aug 24, 2017
1 parent e946219 commit 9184472
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ class VR extends Plugin {
}

addCardboardButton_() {
if (!this.player_.getChild('CardboardButton')) {
if (!this.player_.controlBar.getChild('CardboardButton')) {
this.player_.controlBar.addChild('CardboardButton', {});
}
}
Expand Down

0 comments on commit 9184472

Please sign in to comment.