From 06139f7188f4d4dbd6a94ee544e4881b0fa84aae Mon Sep 17 00:00:00 2001 From: brandonocasey Date: Wed, 23 Aug 2017 17:01:47 -0400 Subject: [PATCH] fix: correctly check for cardboard button on control bar so we don't add two --- src/plugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugin.js b/src/plugin.js index e040dae3..0a469da9 100644 --- a/src/plugin.js +++ b/src/plugin.js @@ -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', {}); } }