From 900fae30fdff36fb384ad574fb7bd47ad4368e67 Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Thu, 4 May 2017 19:05:52 -0700 Subject: [PATCH] avoid calling editEntity on overlays --- scripts/system/controllers/handControllerGrab.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/system/controllers/handControllerGrab.js b/scripts/system/controllers/handControllerGrab.js index b05f0b241b..adec4d7258 100644 --- a/scripts/system/controllers/handControllerGrab.js +++ b/scripts/system/controllers/handControllerGrab.js @@ -3912,9 +3912,12 @@ function MyController(hand) { } } else { - Entities.editEntity(childID, { parentID: NULL_UUID }); - if (Overlays.getProperty(childID, "grabbable")) { - Overlays.editOverlay(childID, { parentID: NULL_UUID }); + if (childType == "entity") { + Entities.editEntity(childID, { parentID: NULL_UUID }); + } else if (childType == "overlay") { + if (Overlays.getProperty(childID, "grabbable")) { + Overlays.editOverlay(childID, { parentID: NULL_UUID }); + } } } }