Skip to content

Commit

Permalink
Make sure objects are properly parented when fetching all objects
Browse files Browse the repository at this point in the history
  • Loading branch information
TomMettam committed Nov 29, 2023
1 parent e395a7a commit d263af3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
13 changes: 13 additions & 0 deletions lib/classes/ObjectStoreLite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1215,6 +1215,19 @@ export class ObjectStoreLite implements IObjectStore
results.push(parent);
}
}
if (go.ParentID)
{
let objects = this.objectsByParent.get(go.ParentID)
if (!objects?.includes(localID))
{
if (objects === undefined)
{
objects = [];
}
objects.push(localID);
this.objectsByParent.set(go.ParentID, objects);
}
}
}
catch (error)
{
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@caspertech/node-metaverse",
"version": "0.7.20",
"version": "0.7.21",
"description": "A node.js interface for Second Life.",
"main": "dist/lib/index.js",
"types": "dist/lib/index.d.ts",
Expand Down

0 comments on commit d263af3

Please sign in to comment.