When a survey is already taken, there is this js error (reproduced on demo server)
survey.fr.js:72 Uncaught ReferenceError: takenSurveyId is not defined at survey_alreadyTaken (survey.fr.js:72) at enquete-en-ligne.html:542
when calling
if (survey_alreadyTaken("survey://ab776717-5384-4d7f-b39c-1e5aff6d2e9c", ""))