avoid calling editEntity on overlays

This commit is contained in:
Seth Alves 2017-05-04 19:05:52 -07:00
parent a7c684e007
commit 900fae30fd

View file

@ -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 });
}
}
}
}