@labdigital/commercetools-mock 2.62.0 → 2.62.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.mjs CHANGED
@@ -666,11 +666,11 @@ const getBusinessUnitKeyReference = (id, projectKey, storage) => {
666
666
  typeId: "business-unit",
667
667
  key: id.key
668
668
  };
669
- const value = getReferenceFromResourceIdentifier(id, projectKey, storage);
670
- if (!value.obj?.key) throw new Error("No business-unit found for reference");
669
+ const resource = storage.getByResourceIdentifier(projectKey, id);
670
+ if (!resource?.key) throw new Error("No business-unit found for reference");
671
671
  return {
672
672
  typeId: "business-unit",
673
- key: value.obj?.key
673
+ key: resource.key
674
674
  };
675
675
  };
676
676