Cannot read properties of undefined (reading 'removeAttachment')

This commit is contained in:
callcolor
2022-08-06 11:42:24 -05:00
committed by Casper Warden
parent e9b3130748
commit 55042803fe

View File

@@ -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);
}
}