From 2116647cd110b9016fc760665523c7b28667e15b Mon Sep 17 00:00:00 2001 From: ChenX Date: Fri, 4 Mar 2022 17:11:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D:PU=E5=90=8E=E8=AE=BF?= =?UTF-8?q?=E9=97=AE=E5=88=B0=E7=A9=BA=E5=AF=B9=E8=B1=A1=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/DatabaseServices/ViewportEntity.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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()