@lighthouse/common
Advanced tools
Comparing version 4.24.1-canary.111.1400 to 4.24.1-canary-1
@@ -41,5 +41,3 @@ "use strict"; | ||
const areaLocationMap = (0, _lodash.reduce)(areaLocations, (memo, location) => { | ||
var _location$legacyId; | ||
const legacyId = location === null || location === void 0 ? void 0 : (_location$legacyId = location.legacyId) === null || _location$legacyId === void 0 ? void 0 : _location$legacyId.toString(); | ||
const legacyId = location?.legacyId?.toString(); | ||
if (!legacyId) return memo; | ||
@@ -52,5 +50,3 @@ memo[legacyId] = location; | ||
const locationMap = (0, _lodash.isArray)(locations) ? (0, _lodash.reduce)(locations, (memo, location) => { | ||
var _location$_id; | ||
const locationId = location === null || location === void 0 ? void 0 : (_location$_id = location._id) === null || _location$_id === void 0 ? void 0 : _location$_id.toString(); | ||
const locationId = location?._id?.toString(); | ||
if (!locationId) return memo; | ||
@@ -61,5 +57,3 @@ memo[locationId] = location; | ||
const zoneMap = (0, _lodash.isArray)(zones) ? (0, _lodash.reduce)(zones, (memo, zone) => { | ||
var _zone$_id; | ||
const zoneId = zone === null || zone === void 0 ? void 0 : (_zone$_id = zone._id) === null || _zone$_id === void 0 ? void 0 : _zone$_id.toString(); | ||
const zoneId = zone?._id?.toString(); | ||
if (!zoneId) return memo; | ||
@@ -66,0 +60,0 @@ memo[zoneId] = zone; |
@@ -115,3 +115,4 @@ "use strict"; | ||
const taskRows = (0, _lodash.map)(tasks, getFormRowData('tasks', data)); | ||
const exceedsMaxForms = (0, _lodash.size)([...auditRows, issueRows, taskRows]) > MAX_ATTACHMENTS; | ||
const formCount = (0, _lodash.size)([...auditRows, ...issueRows, ...taskRows]); | ||
const exceedsMaxForms = formCount > MAX_ATTACHMENTS; | ||
const rows = [...auditRows, ...issueRows, ...scanRows, ...taskRows]; | ||
@@ -118,0 +119,0 @@ const sortedRows = (0, _lodash.sortBy)(rows, ['timestamp'], ['asc']); |
@@ -169,3 +169,3 @@ import _regeneratorRuntime from "@babel/runtime/regenerator"; | ||
_buildActivitySummarySection = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(data) { | ||
var audits, events, issues, _data$maxScans, maxScans, settings, tasks, timezone, MAX_ATTACHMENTS, enterEvents, exceedsMaxScans, scans, auditRows, issueRows, scanRows, taskRows, exceedsMaxForms, rows, sortedRows, title, header, hLine, activityTable, activitySummarySection, maxScansText, maxFormsText; | ||
var audits, events, issues, _data$maxScans, maxScans, settings, tasks, timezone, MAX_ATTACHMENTS, enterEvents, exceedsMaxScans, scans, auditRows, issueRows, scanRows, taskRows, formCount, exceedsMaxForms, rows, sortedRows, title, header, hLine, activityTable, activitySummarySection, maxScansText, maxFormsText; | ||
@@ -187,3 +187,4 @@ return _regeneratorRuntime.wrap(function _callee4$(_context4) { | ||
taskRows = map(tasks, getFormRowData('tasks', data)); | ||
exceedsMaxForms = size([].concat(_toConsumableArray(auditRows), [issueRows, taskRows])) > MAX_ATTACHMENTS; | ||
formCount = size([].concat(_toConsumableArray(auditRows), _toConsumableArray(issueRows), _toConsumableArray(taskRows))); | ||
exceedsMaxForms = formCount > MAX_ATTACHMENTS; | ||
rows = [].concat(_toConsumableArray(auditRows), _toConsumableArray(issueRows), _toConsumableArray(scanRows), _toConsumableArray(taskRows)); | ||
@@ -200,3 +201,3 @@ sortedRows = sortBy(rows, ['timestamp'], ['asc']); | ||
hLine = horizontalLine(); | ||
_context4.next = 17; | ||
_context4.next = 18; | ||
return buildActivityTable({ | ||
@@ -208,3 +209,3 @@ rows: sortedRows, | ||
case 17: | ||
case 18: | ||
activityTable = _context4.sent; | ||
@@ -235,3 +236,3 @@ activitySummarySection = [header, hLine, activityTable]; | ||
case 22: | ||
case 23: | ||
case "end": | ||
@@ -238,0 +239,0 @@ return _context4.stop(); |
{ | ||
"name": "@lighthouse/common", | ||
"version": "4.24.1-canary.111.1400", | ||
"version": "4.24.1-canary-1", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1233495
11873