mdn-bcd-collector
mdn-bcd-collector copied to clipboard
update-bcd: `null` is not replaced with `false`
This seems to have been introduced in the last update, most likely. If BCD has the version set to null, but the collector determines false, it does not appear to overwrite null.
CC @foolip @mzgoddard
@queengooborg do you mean this is a likely regression? Can this be reproduced using current results in https://github.com/openwebdocs/mdn-bcd-results and for which BCD path?
This is a definite regression. This can be reproduced easiest with the add-new-bcd script. In any feature added that a browser doesn't support, the default null value is left instead of being replaced with false. The HTMLElement constructor that is being added is a great demonstration of this:
Update: after making some tweaks to enable verbosity, it appears that this is an issue with the logic for hasSupportUpdates. I'm getting a warning that updates were skipped because the support matrix matches current BCD support data, but that's not accurate if BCD says null and we know it should be false.
I don't know the new version of the update-bcd script well enough to be able to fix this. 😞
I'll take a look at this.
I'm sorry it took me this long, but I finally made the time to debug this and make a fix: https://github.com/openwebdocs/mdn-bcd-collector/pull/1473