fix logic that checks getEntityProperties return value

This commit is contained in:
Seth Alves 2016-02-22 19:03:12 -08:00
parent f113a83c5b
commit 23b204c0c6

View file

@ -1588,11 +1588,10 @@ function MyController(hand) {
ids.forEach(function(id) {
var props = Entities.getEntityProperties(id, ["boundingBox", "name"]);
if (props.name === 'pointer') {
continue;
}
if (!props || !props.boundingBox) {
continue;
if (!props ||
!props.boundingBox ||
props.name === 'pointer') {
return;
}
var entityMinPoint = props.boundingBox.brn;
var entityMaxPoint = props.boundingBox.tfl;