From 55042803feb42911deee4b4da7783aa4241f0da7 Mon Sep 17 00:00:00 2001 From: callcolor Date: Sat, 6 Aug 2022 11:42:24 -0500 Subject: [PATCH] Cannot read properties of undefined (reading 'removeAttachment') --- lib/classes/ObjectStoreLite.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/classes/ObjectStoreLite.ts b/lib/classes/ObjectStoreLite.ts index ce5c48e..b95a31d 100644 --- a/lib/classes/ObjectStoreLite.ts +++ b/lib/classes/ObjectStoreLite.ts @@ -800,7 +800,7 @@ export class ObjectStoreLite implements IObjectStore { if (this.objects[obj.ParentID] !== undefined && this.objects[obj.ParentID].PCode === PCode.Avatar) { - this.agent.currentRegion.agents[this.objects[obj.ParentID].FullID.toString()].removeAttachment(obj); + this.agent.currentRegion.agents[this.objects[obj.ParentID].FullID.toString()]?.removeAttachment(obj); } }