From b03180a26cb7ebfbceabb2ecb52ea990d068de5a Mon Sep 17 00:00:00 2001 From: Henry Zhu Date: Thu, 24 Nov 2016 15:54:54 -0500 Subject: [PATCH] add opera at the end --- experimental/babel-preset-env/scripts/build-data.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/experimental/babel-preset-env/scripts/build-data.js b/experimental/babel-preset-env/scripts/build-data.js index 9d20ec766b..1c70a4884f 100644 --- a/experimental/babel-preset-env/scripts/build-data.js +++ b/experimental/babel-preset-env/scripts/build-data.js @@ -85,11 +85,6 @@ const getLowestImplementedVersion = ({ features }, env) => { // `equals` in compat-table Object.keys(test).forEach((t) => { test[invertedEqualsEnv[t]] = test[t]; - // add opera - if (t.startsWith("chrome")) { - let opera = parseInt(t.replace("chrome", "")) - 13; - test[`opera${opera}`] = test[t]; - } }); return Object.keys(test) @@ -131,6 +126,11 @@ for (const pluginName in pluginFeatures) { plugin[env] = version; } } + + // add opera + if (plugin.chrome) { + plugin.opera = plugin.chrome - 13; + } }); data[pluginName] = plugin; }