Closed PrathumP closed 1 year ago
I've corrected the error in the new commit.
Thanks @PrathumP. This looks good.
There is some work needed to update the tests, but I will take care of those later this week & then commit this PR.
Thank you for your contribution.
@PrathumP thanks for starting this. averageIntensity exports an object with two keys: data (object) and type (string). You can see that here: https://github.com/thegreenwebfoundation/co2.js/blob/8d87ca9ca56489df3272a48ce4b0ee62ff368008/src/data/average-intensities.min.js
Inside of the data object, we want to get the value for the "WORLD" and use that for the GLOBAL_GRID_INTENSITY constant.
https://github.com/thegreenwebfoundation/co2.js/blob/9014711cb6326b304e15a29819998b149000b166/src/constants/index.js#L18
Can you update the PR with this please.