@startinblox/core 0.19.0-beta.11 → 0.19.0-beta.13

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
@@ -11059,7 +11059,7 @@ class CustomGetter {
11059
11059
  */
11060
11060
  async getResource(id2, context2, iriParent, forceFetch = false) {
11061
11061
  if (id2.startsWith("_:b"))
11062
- return store.get(id2 + iriParent);
11062
+ return store.get(id2);
11063
11063
  return store.getData(id2, context2, iriParent, void 0, forceFetch);
11064
11064
  }
11065
11065
  /**
@@ -11145,7 +11145,7 @@ class CustomGetter {
11145
11145
  if (!Array.isArray(permissionsIds))
11146
11146
  permissionsIds = [permissionsIds];
11147
11147
  const permissions = await Promise.all(
11148
- permissionsIds.map((p) => store.get(p["@id"] + this.parentId)).map((p) => p ? p["mode.@type"] : "")
11148
+ permissionsIds.map((p) => store.get(p["@id"])).map((p) => p ? p["mode.@type"] : "")
11149
11149
  );
11150
11150
  return permissions ? permissions.map(
11151
11151
  (perm) => ContextParser$1.expandTerm(perm, this.serverContext, true)
@@ -11432,8 +11432,6 @@ class Store {
11432
11432
  console.log("No key or id for resource:", resource2);
11433
11433
  if (key === "/")
11434
11434
  key = parentId;
11435
- if (key.startsWith("_:b"))
11436
- key = key + parentId;
11437
11435
  if (key === id2 && resource2["@type"] == this.getExpandedPredicate("ldp:Container", clientContext)) {
11438
11436
  if (serverPagination)
11439
11437
  key = appendServerPaginationToIri(key, serverPagination);
@@ -12095,8 +12093,8 @@ const StoreMixin = {
12095
12093
  const resource = await store.getData(value, this.context);
12096
12094
  const nestedResource = resource ? await resource[this.nestedField] : null;
12097
12095
  this.resourceId = nestedResource ? nestedResource["@id"] : null;
12098
- if (!this.resourceId)
12099
- throw `Error: the key "${this.nestedField}" does not exist on the resource`;
12096
+ if (resource && !this.resourceId)
12097
+ throw `Error: the key "${this.nestedField}" does not exist on the resource at id "${await resource["@id"]}"`;
12100
12098
  }
12101
12099
  this.updateNavigateSubscription();
12102
12100
  this.subscription = PubSub.subscribe(this.resourceId, this.updateDOM.bind(this));