From 3e13700917ade909ae3a9ee65f63419c542ecf5e Mon Sep 17 00:00:00 2001
From: Li Yi Yu
Date: Thu, 14 Dec 2023 14:40:39 -0500
Subject: [PATCH] make link survey link optional (#938)
---
src/extensions/surveys/surveys-utils.ts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/extensions/surveys/surveys-utils.ts b/src/extensions/surveys/surveys-utils.ts
index e6814daa2..d8a02783d 100644
--- a/src/extensions/surveys/surveys-utils.ts
+++ b/src/extensions/surveys/surveys-utils.ts
@@ -587,8 +587,8 @@ export const createOpenTextOrLinkPopup = (
[`$survey_responded/${survey.id}`]: true,
},
})
- if (surveyQuestionType === 'link') {
- window.open(question.link || undefined)
+ if (surveyQuestionType === 'link' && question.link) {
+ window.open(question.link)
}
window.setTimeout(() => {
window.dispatchEvent(new Event('PHSurveySent'))