diff --git a/plugins/splunk-on-call/src/components/EntitySplunkOnCallCard.tsx b/plugins/splunk-on-call/src/components/EntitySplunkOnCallCard.tsx index 8dbbf6e848..5f9db7e415 100644 --- a/plugins/splunk-on-call/src/components/EntitySplunkOnCallCard.tsx +++ b/plugins/splunk-on-call/src/components/EntitySplunkOnCallCard.tsx @@ -152,6 +152,14 @@ export const EntitySplunkOnCallCard = () => { return { usersHashMap, foundTeams }; }); + if (!teamAnnotation && !routingKeyAnnotation) { + return ; + } + + if (!eventsRestEndpoint) { + return ; + } + if (error instanceof UnauthorizedError) { return ; } @@ -175,10 +183,6 @@ export const EntitySplunkOnCallCard = () => { team: Team | undefined; usersHashMap: any | undefined; }) => { - if (!teamAnnotation && !routingKeyAnnotation) { - return ; - } - if (!team) { return ( { ); } - if (!eventsRestEndpoint) { - return ; - } - const teamName = team.name || ''; return (