@canopy-io/node 0.7.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1323,8 +1323,16 @@ var LocalAuthorizer = class {
1323
1323
  }
1324
1324
  const parents = /* @__PURE__ */ new Map();
1325
1325
  if (result.modified) {
1326
+ const ids = /* @__PURE__ */ new Map();
1326
1327
  for (const edge of result.data.items) {
1327
- parents.set(edge.id, edge.parent_node_id ?? null);
1328
+ ids.set(edge.id, edge.id);
1329
+ }
1330
+ for (const edge of result.data.items) {
1331
+ const parent = edge.parent_node_id ?? null;
1332
+ parents.set(
1333
+ edge.id,
1334
+ parent === null ? null : ids.get(parent) ?? parent
1335
+ );
1328
1336
  }
1329
1337
  }
1330
1338
  this.tree = {