Update entityList.js to check for invalid entityIDs

This commit is contained in:
Ryan Huffman 2014-11-19 15:33:32 -08:00
parent a18a83d45c
commit 4b5d67d519

View file

@ -33,7 +33,12 @@ EntityListTool = function(opts) {
var ids = data.entityIds;
var entityIDs = [];
for (var i = 0; i < ids.length; i++) {
entityIDs.push(Entities.getEntityItemID(ids[i]));
var entityID = Entities.getEntityItemID(ids[i]);
if (entityID.isKnownID) {
entityIDs.push(entityID);
} else {
print("Tried to select invalid entity: " + ids[i]);
}
}
selectionManager.setSelections(entityIDs);
if (data.focus) {