Skip to content

Commit

Permalink
Add optional chaining to avoid npe
Browse files Browse the repository at this point in the history
  • Loading branch information
karthikjeeyar committed Mar 7, 2022
1 parent 85016a7 commit 6070fb4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const useTektonHubIntegration = () => {
'config',
);
if (config && configLoaded && !configLoadErr) {
const devconsoleIntegrationEnabled = config.spec?.hub?.params.find(
const devconsoleIntegrationEnabled = config.spec?.hub?.params?.find(
(p) => p.name === TEKTON_HUB_INTEGRATION_KEY,
);
return devconsoleIntegrationEnabled ? devconsoleIntegrationEnabled.value : true;
Expand Down

0 comments on commit 6070fb4

Please sign in to comment.