зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1661671 - Add plugin to support optional chaining operator in unit tests r=k88hudson
Differential Revision: https://phabricator.services.mozilla.com/D88581
This commit is contained in:
Родитель
188dcede21
Коммит
1ee5cbc410
|
@ -238,7 +238,7 @@ class AboutWelcomeChild extends JSWindowActorChild {
|
|||
Cu.reportError(e);
|
||||
}
|
||||
|
||||
if (experimentData && experimentData.slug) {
|
||||
if (experimentData?.slug) {
|
||||
log.debug(
|
||||
`Loading about:welcome with experiment: ${experimentData.slug}`
|
||||
);
|
||||
|
|
|
@ -224,9 +224,9 @@ async function mount() {
|
|||
slug,
|
||||
branch
|
||||
} = await window.AWGetStartupData();
|
||||
let settings = branch && branch.feature ? branch.feature.value : {};
|
||||
let settings = (branch === null || branch === void 0 ? void 0 : branch.feature) ? branch.feature.value : {};
|
||||
|
||||
if (!(branch && branch.feature)) {
|
||||
if (!(branch === null || branch === void 0 ? void 0 : branch.feature)) {
|
||||
// Check for override content in pref browser.aboutwelcome.overrideContent
|
||||
settings = await window.AWGetMultiStageScreens();
|
||||
}
|
||||
|
|
|
@ -117,9 +117,9 @@ function ComputeMessageId(experimentId, branchId, settings) {
|
|||
|
||||
async function mount() {
|
||||
const { slug, branch } = await window.AWGetStartupData();
|
||||
let settings = branch && branch.feature ? branch.feature.value : {};
|
||||
let settings = branch?.feature ? branch.feature.value : {};
|
||||
|
||||
if (!(branch && branch.feature)) {
|
||||
if (!branch?.feature) {
|
||||
// Check for override content in pref browser.aboutwelcome.overrideContent
|
||||
settings = await window.AWGetMultiStageScreens();
|
||||
}
|
||||
|
|
|
@ -362,11 +362,7 @@ const MessageLoaderUtils = {
|
|||
continue;
|
||||
}
|
||||
|
||||
if (
|
||||
experimentData &&
|
||||
experimentData.branch &&
|
||||
experimentData.branch.feature
|
||||
) {
|
||||
if (experimentData?.branch?.feature) {
|
||||
experiments.push(experimentData.branch.feature.value);
|
||||
|
||||
if (!REACH_EVENT_GROUPS.includes(featureId)) {
|
||||
|
|
|
@ -33,6 +33,7 @@ module.exports = (env = {}) => ({
|
|||
loader: "babel-loader",
|
||||
options: {
|
||||
presets: ["@babel/preset-react"],
|
||||
plugins: ["@babel/plugin-proposal-optional-chaining"],
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче