@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@labdigital/commercetools-mock",
3
- "version": "2.62.0",
3
+ "version": "2.62.1",
4
4
  "license": "MIT",
5
5
  "author": "Michael van Tellingen",
6
6
  "type": "module",
@@ -10,7 +10,6 @@ import type {
10
10
  AssociateRoleResourceIdentifier,
11
11
  BaseAddress,
12
12
  BusinessUnitKeyReference,
13
- BusinessUnitReference,
14
13
  BusinessUnitResourceIdentifier,
15
14
  CentPrecisionMoney,
16
15
  CustomFields,
@@ -323,18 +322,17 @@ export const getBusinessUnitKeyReference = (
323
322
  };
324
323
  }
325
324
 
326
- const value = getReferenceFromResourceIdentifier<BusinessUnitReference>(
327
- id,
325
+ const resource = storage.getByResourceIdentifier<"business-unit">(
328
326
  projectKey,
329
- storage,
327
+ id,
330
328
  );
331
329
 
332
- if (!value.obj?.key) {
330
+ if (!resource?.key) {
333
331
  throw new Error("No business-unit found for reference");
334
332
  }
335
333
 
336
334
  return {
337
335
  typeId: "business-unit",
338
- key: value.obj?.key,
336
+ key: resource.key,
339
337
  };
340
338
  };