From ab668c307badc1ecb3a8473526469f8752497360 Mon Sep 17 00:00:00 2001 From: Matti Nannt Date: Sun, 10 Sep 2023 14:33:04 +0900 Subject: [PATCH] fix: link survey responses may fail when custom survey url is set (#791) --- apps/web/app/s/[surveyId]/LinkSurvey.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/app/s/[surveyId]/LinkSurvey.tsx b/apps/web/app/s/[surveyId]/LinkSurvey.tsx index 47ad3edddd..626e34c769 100644 --- a/apps/web/app/s/[surveyId]/LinkSurvey.tsx +++ b/apps/web/app/s/[surveyId]/LinkSurvey.tsx @@ -42,7 +42,7 @@ export default function LinkSurvey({ () => new ResponseQueue( { - apiHost: typeof window !== "undefined" ? window.location?.origin : WEBAPP_URL, + apiHost: WEBAPP_URL, retryAttempts: 2, onResponseSendingFailed: (response) => { alert(`Failed to send response: ${JSON.stringify(response, null, 2)}`);