@allurereport/core-api 3.0.0 → 3.1.0
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/constants.js +2 -2
- package/package.json +1 -1
package/dist/constants.js
CHANGED
|
@@ -13,12 +13,12 @@ export const filterUnsuccessful = filterByStatus(unsuccessfulStatuses);
|
|
|
13
13
|
export const filterIncludedInSuccessRate = filterByStatus(includedInSuccessRate);
|
|
14
14
|
export const emptyStatistic = () => ({ total: 0 });
|
|
15
15
|
export const incrementStatistic = (statistic, status, count = 1) => {
|
|
16
|
-
statistic[status] = (statistic[status] ?? 0) + count;
|
|
16
|
+
statistic[status] = (statistic?.[status] ?? 0) + count;
|
|
17
17
|
statistic.total += count;
|
|
18
18
|
};
|
|
19
19
|
export const mergeStatistic = (statistic, additional) => {
|
|
20
20
|
statusesList.forEach((status) => {
|
|
21
|
-
if (additional[status]) {
|
|
21
|
+
if (additional?.[status]) {
|
|
22
22
|
incrementStatistic(statistic, status, additional[status]);
|
|
23
23
|
}
|
|
24
24
|
});
|