mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 12:04:18 +02:00
Update entityList.js to check for invalid entityIDs
This commit is contained in:
parent
a18a83d45c
commit
4b5d67d519
1 changed files with 6 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue