@barchart/portfolio-api-common 1.0.70 → 1.0.71
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.
|
@@ -99,7 +99,7 @@ module.exports = (() => {
|
|
|
99
99
|
const getSummaryTotal = (index) => {
|
|
100
100
|
let summaryTotal;
|
|
101
101
|
|
|
102
|
-
if (summaries.length >
|
|
102
|
+
if (summaries.length > index && summaries[index] !== null) {
|
|
103
103
|
const period = summaries[index].period;
|
|
104
104
|
|
|
105
105
|
summaryTotal = period.realized.add(period.unrealized).add(period.income);
|
package/package.json
CHANGED
package/test/SpecRunner.js
CHANGED
|
@@ -1262,7 +1262,7 @@ module.exports = (() => {
|
|
|
1262
1262
|
const getSummaryTotal = (index) => {
|
|
1263
1263
|
let summaryTotal;
|
|
1264
1264
|
|
|
1265
|
-
if (summaries.length >
|
|
1265
|
+
if (summaries.length > index && summaries[index] !== null) {
|
|
1266
1266
|
const period = summaries[index].period;
|
|
1267
1267
|
|
|
1268
1268
|
summaryTotal = period.realized.add(period.unrealized).add(period.income);
|