From ce105e0329b03ac8086afcea6e79d714417b4546 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Wed, 8 Mar 2017 22:21:57 +0000 Subject: [PATCH] fix double tablets when reloading scripts --- scripts/system/tablet-ui/tabletUI.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/system/tablet-ui/tabletUI.js b/scripts/system/tablet-ui/tabletUI.js index d5065cb826..fd73578328 100644 --- a/scripts/system/tablet-ui/tabletUI.js +++ b/scripts/system/tablet-ui/tabletUI.js @@ -131,7 +131,9 @@ } Script.scriptEnding.connect(function () { - Entities.deleteEntity(HMD.tabletID); + var tabletID = HMD.tabletID; + Entities.deleteEntity(tabletID); + Overlays.deleteOverlay(tabletID) HMD.tabletID = null; HMD.homeButtonID = null; HMD.tabletScreenID = null;