Update compat-table (#11890)

* chore: update compat-table

* chore: friendly to node < 14 contributors

Co-Authored-By: Brian Ng <bng412@gmail.com>

Co-authored-by: Brian Ng <bng412@gmail.com>
This commit is contained in:
Huáng Jùnliàng
2020-07-29 17:09:26 -04:00
parent 2f89e72321
commit 95fcb3e16c
7 changed files with 56 additions and 76 deletions

View File

@@ -35,8 +35,8 @@ function process(source) {
const allowedBrowsers = {};
Object.keys(stats).forEach(browser => {
const browserName = browserNameMap[browser] ?? browser;
let browserSupport = stats[browserSupportMap[browserName] ?? browser];
const browserName = browserNameMap[browser] || browser;
let browserSupport = stats[browserSupportMap[browserName] || browser];
if (Array.isArray(browserSupport)) {
browserSupport = browserSupport[0]; // The first item is the most progressive support
}