CreateImageWizard/requestMapper: fix enabling firstboot
Reorder the code to be easier to read:
when there none of service.{enabled|masked|disabled}
firstboot also is not enabled (if requested)
this patch fixes this bug
This commit is contained in:
parent
bd8eaaf8b9
commit
faa3385054
1 changed files with 7 additions and 9 deletions
|
|
@ -494,15 +494,6 @@ const getCustomizations = (state: RootState, orgID: string): Customizations => {
|
|||
|
||||
const getServices = (state: RootState): Services | undefined => {
|
||||
const services = selectServices(state);
|
||||
if (
|
||||
services.enabled.length === 0 &&
|
||||
services.masked.length === 0 &&
|
||||
services.disabled.length === 0 &&
|
||||
!selectFirstBootScript(state)
|
||||
) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
let enabledSvcs = services.enabled || [];
|
||||
const includeFBSvc: boolean =
|
||||
!!selectFirstBootScript(state) &&
|
||||
|
|
@ -510,6 +501,13 @@ const getServices = (state: RootState): Services | undefined => {
|
|||
if (includeFBSvc) {
|
||||
enabledSvcs = [...enabledSvcs, FIRST_BOOT_SERVICE];
|
||||
}
|
||||
if (
|
||||
enabledSvcs.length === 0 &&
|
||||
services.masked.length === 0 &&
|
||||
services.disabled.length === 0
|
||||
) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return {
|
||||
enabled: enabledSvcs.length ? enabledSvcs : undefined,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue