@govtechsg/oobee 0.10.88 → 0.10.89
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.
|
@@ -409,8 +409,10 @@ const buildColorContrastMessage = (node) => {
|
|
|
409
409
|
data.expectedContrastRatio;
|
|
410
410
|
if (!hasContrastData)
|
|
411
411
|
return;
|
|
412
|
-
|
|
413
|
-
|
|
412
|
+
if (!data.fgColor || !data.bgColor)
|
|
413
|
+
return;
|
|
414
|
+
const fgColor = data.fgColor;
|
|
415
|
+
const bgColor = data.bgColor;
|
|
414
416
|
const contrastRatio = String(data.contrastRatio ?? 'unknown');
|
|
415
417
|
const fontSize = formatContrastFontSize(data.fontSize);
|
|
416
418
|
const fontWeight = data.fontWeight || 'normal';
|
package/package.json
CHANGED
|
@@ -529,8 +529,10 @@ const buildColorContrastMessage = (node: NodeResultWithScreenshot): string | nul
|
|
|
529
529
|
|
|
530
530
|
if (!hasContrastData) return;
|
|
531
531
|
|
|
532
|
-
|
|
533
|
-
|
|
532
|
+
if (!data.fgColor || !data.bgColor) return;
|
|
533
|
+
|
|
534
|
+
const fgColor = data.fgColor;
|
|
535
|
+
const bgColor = data.bgColor;
|
|
534
536
|
const contrastRatio = String(data.contrastRatio ?? 'unknown');
|
|
535
537
|
const fontSize = formatContrastFontSize(data.fontSize);
|
|
536
538
|
const fontWeight = data.fontWeight || 'normal';
|