Skip to content

Commit

Permalink
Really fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
jen-huang committed Jul 13, 2020
1 parent 05daa7b commit 8fdb79e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ export const hasInvalidButRequiredVar = (
registryVars.find(
(registryVar) =>
registryVar.required &&
(!packageConfigVars[registryVar.name] ||
(!packageConfigVars ||
!packageConfigVars[registryVar.name] ||
validatePackageConfigConfig(packageConfigVars[registryVar.name], registryVar)?.length)
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,27 +278,28 @@ export const EditPackageConfigPage: React.FunctionComponent = () => {
};

const configurePackage = useMemo(
() => (
<>
<StepDefinePackageConfig
agentConfig={agentConfig}
packageInfo={packageInfo}
packageConfig={packageConfig}
updatePackageConfig={updatePackageConfig}
validationResults={validationResults!}
/>
() =>
agentConfig && packageInfo ? (
<>
<StepDefinePackageConfig
agentConfig={agentConfig}
packageInfo={packageInfo}
packageConfig={packageConfig}
updatePackageConfig={updatePackageConfig}
validationResults={validationResults!}
/>

<StepConfigurePackage
from={'edit'}
packageInfo={packageInfo}
packageConfig={packageConfig}
packageConfigId={packageConfigId}
updatePackageConfig={updatePackageConfig}
validationResults={validationResults!}
submitAttempted={formState === 'INVALID'}
/>
</>
),
<StepConfigurePackage
from={'edit'}
packageInfo={packageInfo}
packageConfig={packageConfig}
packageConfigId={packageConfigId}
updatePackageConfig={updatePackageConfig}
validationResults={validationResults!}
submitAttempted={formState === 'INVALID'}
/>
</>
) : null,
[
agentConfig,
formState,
Expand Down

0 comments on commit 8fdb79e

Please sign in to comment.