mirror of
https://github.com/formbricks/formbricks.git
synced 2026-01-19 03:10:35 -06:00
fix: generate single survey Ids in summary only if enabled (#942)
This commit is contained in:
committed by
GitHub
parent
cce3a98f20
commit
a78c19385e
@@ -30,7 +30,12 @@ export default async function Page({ params }) {
|
||||
getEnvironment(params.environmentId),
|
||||
]);
|
||||
const isSingleUseSurvey = survey.singleUse?.enabled ?? false;
|
||||
const singleUseIds = generateSingleUseIds(survey.singleUse?.isEncrypted ?? false);
|
||||
|
||||
let singleUseIds: string[] | undefined = undefined;
|
||||
if (isSingleUseSurvey) {
|
||||
singleUseIds = generateSingleUseIds(survey.singleUse?.isEncrypted ?? false);
|
||||
}
|
||||
|
||||
if (!environment) {
|
||||
throw new Error("Environment not found");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user