diff --git a/src/DatabaseServices/ViewportEntity.ts b/src/DatabaseServices/ViewportEntity.ts index d4723c853..f06bf63ac 100644 --- a/src/DatabaseServices/ViewportEntity.ts +++ b/src/DatabaseServices/ViewportEntity.ts @@ -172,8 +172,12 @@ export class ViewportEntity extends Entity get Entitys() { let ens: Entity[] = []; - for (let id of [...this._ShowObjectIds, ...this._HideObjectIds]) - ens.push(id.Object as Entity); + for (let id of this._ShowObjectIds) + if (id?.Object) ens.push(id.Object as Entity); + + for (let id of this._HideObjectIds) + if (id?.Object) ens.push(id.Object as Entity); + return ens; } get Points()