如果满足条件,我想跳过块语句。
const isJQuery = apps[key].technology === "jQuery";
//如果检查以下条件,我想跳过isJQuery。
if (!apps[key].aemSchema ) {
additionalErrors.push(
`There is no schema defined for ${key} (aka ${apps[key]})!`
);
} else if (!schemas[apps[key].aemSchema] ) {
additionalErrors.push(
`No schema ${key} (aka ${
apps[key]
})! Double check that it exists in name ${
apps[key].aemSchema
}, and that the version included here is right.
`found apps was `,
apps
);
}
任何帮助都会有所帮助。我试过
if (!apps[key].aemSchema || !isJQuery) { //code }
但这将始终检查第一个条件。
绝地无双
相关分类