SIGN IN SIGN UP

24 Lessons, 12 Weeks, Get Started as a Web Developer

0 0 198 JavaScript

Fix: handle missing carbonIntensity and fossilFuelPercentage safely

The displayCarbonUsage function now includes null-safe checks to prevent runtime errors when CO₂ Signal API data is missing. Added user-facing fallback text and console warnings.
A
Anas Ahmed committed
cf2cc32760f0ee2fcddc545f3719b062d993be2d
Parent: 79c8499
Committed by GitHub <noreply@github.com> on 10/15/2025, 11:06:37 AM