diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/step_select_agent_policy.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/step_select_agent_policy.tsx index 9c94bb939cdf8e..01b18b1fc24017 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/step_select_agent_policy.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/step_select_agent_policy.tsx @@ -246,7 +246,7 @@ export const StepSelectAgentPolicy: React.FunctionComponent<{ id="xpack.fleet.createPackagePolicy.StepSelectPolicy.agentPolicyAgentsDescriptionText" defaultMessage="{count, plural, one {# agent} other {# agents}} are enrolled with the selected agent policy." values={{ - count: agentPoliciesById[selectedPolicyId].agents || 0, + count: agentPoliciesById[selectedPolicyId]?.agents || 0, }} /> ) : null