mirror of
https://github.com/formbricks/formbricks.git
synced 2025-12-30 10:19:51 -06:00
fix client error when survey builder contains no questions FOR-564
This commit is contained in:
@@ -93,7 +93,7 @@ export default function PreviewSurvey({
|
||||
return null;
|
||||
}
|
||||
|
||||
const lastQuestion = currentQuestion.id === questions[questions.length - 1].id;
|
||||
const lastQuestion = questions.length > 0 && currentQuestion.id === questions[questions.length - 1].id;
|
||||
|
||||
return (
|
||||
<Modal isOpen={isModalOpen} reset={resetPreview}>
|
||||
|
||||
Reference in New Issue
Block a user