@barchart/portfolio-api-common 1.2.16 → 1.2.17

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.
@@ -419,6 +419,8 @@ module.exports = (() => {
419
419
 
420
420
  if (price) {
421
421
  priceToUse = price;
422
+ } else if (data.previousPrice) {
423
+ priceToUse = new Decimal(data.previousPrice);
422
424
  } else if (!summary.end.open.getIsZero()) {
423
425
  priceToUse = summary.end.value.divide(summary.end.open);
424
426
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barchart/portfolio-api-common",
3
- "version": "1.2.16",
3
+ "version": "1.2.17",
4
4
  "description": "Common classes used by the Portfolio system",
5
5
  "author": {
6
6
  "name": "Bryan Ingle",
@@ -3437,6 +3437,8 @@ module.exports = (() => {
3437
3437
 
3438
3438
  if (price) {
3439
3439
  priceToUse = price;
3440
+ } else if (data.previousPrice) {
3441
+ priceToUse = new Decimal(data.previousPrice);
3440
3442
  } else if (!summary.end.open.getIsZero()) {
3441
3443
  priceToUse = summary.end.value.divide(summary.end.open);
3442
3444
  } else {