@lighthouse/common 4.24.0 → 4.24.1-canary.111.1400
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.
|
@@ -38,7 +38,9 @@ function getLocationReference(data = {}) {
|
|
|
38
38
|
// locations legacyId reference as a key which will match a legacy location id on the entity
|
|
39
39
|
|
|
40
40
|
const areaLocationMap = (0, _lodash.reduce)(areaLocations, (memo, location) => {
|
|
41
|
-
|
|
41
|
+
var _location$legacyId;
|
|
42
|
+
|
|
43
|
+
const legacyId = location === null || location === void 0 ? void 0 : (_location$legacyId = location.legacyId) === null || _location$legacyId === void 0 ? void 0 : _location$legacyId.toString();
|
|
42
44
|
if (!legacyId) return memo;
|
|
43
45
|
memo[legacyId] = location;
|
|
44
46
|
return memo;
|
|
@@ -46,13 +48,17 @@ function getLocationReference(data = {}) {
|
|
|
46
48
|
// format before running through
|
|
47
49
|
|
|
48
50
|
const locationMap = (0, _lodash.isArray)(locations) ? (0, _lodash.reduce)(locations, (memo, location) => {
|
|
49
|
-
|
|
51
|
+
var _location$_id;
|
|
52
|
+
|
|
53
|
+
const locationId = location === null || location === void 0 ? void 0 : (_location$_id = location._id) === null || _location$_id === void 0 ? void 0 : _location$_id.toString();
|
|
50
54
|
if (!locationId) return memo;
|
|
51
55
|
memo[locationId] = location;
|
|
52
56
|
return memo;
|
|
53
57
|
}, {}) : locations;
|
|
54
58
|
const zoneMap = (0, _lodash.isArray)(zones) ? (0, _lodash.reduce)(zones, (memo, zone) => {
|
|
55
|
-
|
|
59
|
+
var _zone$_id;
|
|
60
|
+
|
|
61
|
+
const zoneId = zone === null || zone === void 0 ? void 0 : (_zone$_id = zone._id) === null || _zone$_id === void 0 ? void 0 : _zone$_id.toString();
|
|
56
62
|
if (!zoneId) return memo;
|
|
57
63
|
memo[zoneId] = zone;
|
|
58
64
|
return memo;
|