From 281c8649b1d80138745097bd903fb68e34d89bed Mon Sep 17 00:00:00 2001 From: Nick O'Ferrall Date: Thu, 27 Jun 2024 17:30:41 +0100 Subject: [PATCH] fix: remove ai from summary url if no ai env var --- packages/client/mutations/EndRetrospectiveMutation.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/client/mutations/EndRetrospectiveMutation.ts b/packages/client/mutations/EndRetrospectiveMutation.ts index f087fbe1197..c44f0b85d88 100644 --- a/packages/client/mutations/EndRetrospectiveMutation.ts +++ b/packages/client/mutations/EndRetrospectiveMutation.ts @@ -128,7 +128,10 @@ export const endRetrospectiveTeamOnNext: OnNextHandler< } else { const reflections = reflectionGroups.flatMap((group) => group.reflections) // reflectionCount hasn't been calculated yet so check reflections length const hasMoreThanOneReflection = reflections.length > 1 - const hasOpenAISummary = hasMoreThanOneReflection && !organization.featureFlags.noAISummary + const hasOpenAISummary = + hasMoreThanOneReflection && + !organization.featureFlags.noAISummary && + window.__ACTION__.hasOpenAI const hasTeamHealth = phases.some((phase) => phase.phaseType === 'TEAM_HEALTH') const pathname = `/new-summary/${meetingId}` const search = new URLSearchParams()