@qrvey/utils 1.18.3 → 1.18.4
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/README.md
CHANGED
|
@@ -430,8 +430,10 @@ function computeDeltaCellContent(comparativeAnalisis, columnKey, rawValue, optio
|
|
|
430
430
|
}
|
|
431
431
|
else if (flag === "showPercent" && showPercent) {
|
|
432
432
|
const origNum = options?.originalValue;
|
|
433
|
+
const compValueProvided = options != null &&
|
|
434
|
+
Object.prototype.hasOwnProperty.call(options, "comparisonValue");
|
|
433
435
|
const compVal = options?.comparisonValue;
|
|
434
|
-
if (compVal
|
|
436
|
+
if (compValueProvided && (compVal == null || (typeof compVal === "number" && isNaN(compVal))) && origNum != null) {
|
|
435
437
|
parts.push(options?.missingLabel ?? "Missing");
|
|
436
438
|
}
|
|
437
439
|
else if (origNum != null &&
|
|
@@ -413,8 +413,10 @@ export function computeDeltaCellContent(comparativeAnalisis, columnKey, rawValue
|
|
|
413
413
|
}
|
|
414
414
|
else if (flag === "showPercent" && showPercent) {
|
|
415
415
|
const origNum = options?.originalValue;
|
|
416
|
+
const compValueProvided = options != null &&
|
|
417
|
+
Object.prototype.hasOwnProperty.call(options, "comparisonValue");
|
|
416
418
|
const compVal = options?.comparisonValue;
|
|
417
|
-
if (compVal
|
|
419
|
+
if (compValueProvided && (compVal == null || (typeof compVal === "number" && isNaN(compVal))) && origNum != null) {
|
|
418
420
|
parts.push(options?.missingLabel ?? "Missing");
|
|
419
421
|
}
|
|
420
422
|
else if (origNum != null &&
|