@barchart/portfolio-api-common 1.2.25 → 1.2.26
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.
|
@@ -117,7 +117,6 @@ module.exports = (() => {
|
|
|
117
117
|
this._dataFormat.quoteChangeNegative = false;
|
|
118
118
|
|
|
119
119
|
this._dataActual.currentPrice = null;
|
|
120
|
-
this._dataActual.previousPrice = null;
|
|
121
120
|
this._dataActual.basis = null;
|
|
122
121
|
this._dataActual.realized = null;
|
|
123
122
|
this._dataActual.income = null;
|
|
@@ -133,7 +132,6 @@ module.exports = (() => {
|
|
|
133
132
|
this._dataActual.cashTotal = null;
|
|
134
133
|
|
|
135
134
|
this._dataFormat.currentPrice = null;
|
|
136
|
-
this._dataFormat.previousPrice = null;
|
|
137
135
|
this._dataFormat.basis = null;
|
|
138
136
|
this._dataFormat.realized = null;
|
|
139
137
|
this._dataFormat.income = null;
|
|
@@ -189,6 +189,10 @@ module.exports = (() => {
|
|
|
189
189
|
}
|
|
190
190
|
|
|
191
191
|
if (this._currentPricePrevious !== quote.lastPrice) {
|
|
192
|
+
if (this._data.previousPrice === null && quote.previousPrice) {
|
|
193
|
+
this._data.previousPrice = quote.previousPrice;
|
|
194
|
+
}
|
|
195
|
+
|
|
192
196
|
calculatePriceData(this, quote.lastPrice);
|
|
193
197
|
|
|
194
198
|
this._currentPricePrevious = this._currentPrice;
|
package/package.json
CHANGED
package/test/SpecRunner.js
CHANGED
|
@@ -2322,7 +2322,6 @@ module.exports = (() => {
|
|
|
2322
2322
|
this._dataFormat.quoteChangeNegative = false;
|
|
2323
2323
|
|
|
2324
2324
|
this._dataActual.currentPrice = null;
|
|
2325
|
-
this._dataActual.previousPrice = null;
|
|
2326
2325
|
this._dataActual.basis = null;
|
|
2327
2326
|
this._dataActual.realized = null;
|
|
2328
2327
|
this._dataActual.income = null;
|
|
@@ -2338,7 +2337,6 @@ module.exports = (() => {
|
|
|
2338
2337
|
this._dataActual.cashTotal = null;
|
|
2339
2338
|
|
|
2340
2339
|
this._dataFormat.currentPrice = null;
|
|
2341
|
-
this._dataFormat.previousPrice = null;
|
|
2342
2340
|
this._dataFormat.basis = null;
|
|
2343
2341
|
this._dataFormat.realized = null;
|
|
2344
2342
|
this._dataFormat.income = null;
|
|
@@ -3256,6 +3254,10 @@ module.exports = (() => {
|
|
|
3256
3254
|
}
|
|
3257
3255
|
|
|
3258
3256
|
if (this._currentPricePrevious !== quote.lastPrice) {
|
|
3257
|
+
if (this._data.previousPrice === null && quote.previousPrice) {
|
|
3258
|
+
this._data.previousPrice = quote.previousPrice;
|
|
3259
|
+
}
|
|
3260
|
+
|
|
3259
3261
|
calculatePriceData(this, quote.lastPrice);
|
|
3260
3262
|
|
|
3261
3263
|
this._currentPricePrevious = this._currentPrice;
|