@ai4b-team/fsaos-gateway-sdk 5.4.0 → 5.4.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
@@ -2588,9 +2588,9 @@ async function loadMounts(memberSpacePath, resolveRef, options = {}) {
2588
2588
  queue: Promise.resolve()
2589
2589
  };
2590
2590
  assertCurrent(owner);
2591
+ owner.resolve = resolveRef;
2591
2592
  if (owner.loading) return owner.loading;
2592
2593
  if (owner.ready) return getMounts();
2593
- owner.resolve = resolveRef;
2594
2594
  owner.loading = (async () => {
2595
2595
  let data = null;
2596
2596
  try {
@@ -2607,7 +2607,7 @@ async function loadMounts(memberSpacePath, resolveRef, options = {}) {
2607
2607
  owner.exists = false;
2608
2608
  }
2609
2609
  const initial = options.initialAnchor ? canonical(owner, options.initialAnchor) : home;
2610
- const refs = withHome(data ? data.mounts.map(resolveRef).filter((ref) => ref !== null) : [initial]);
2610
+ const refs = withHome(data ? data.mounts.map((id) => owner.resolve(id)).filter((ref) => ref !== null) : [initial]);
2611
2611
  const anchor = data ? refs.find((ref) => ref.id === data.last_anchor) ?? refs.find((ref) => ref.kind === "space") ?? home : initial;
2612
2612
  if (data) owner.saved = signature(refs, anchor);
2613
2613
  else if (options.initialAnchor) await save(owner, refs, anchor);