Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A ReferenceError is thrown on an attempt to generate a SurveyModel on a server #7855

Closed
JaneSjs opened this issue Feb 12, 2024 · 0 comments · Fixed by #7856
Closed

A ReferenceError is thrown on an attempt to generate a SurveyModel on a server #7855

JaneSjs opened this issue Feb 12, 2024 · 0 comments · Fixed by #7856
Assignees
Labels
bug user issue An issue or bug reported by users
Milestone

Comments

@JaneSjs
Copy link
Contributor

JaneSjs commented Feb 12, 2024

ReferenceError: document is not defined
    at new DropdownListModel (/home///backend/node_modules/survey-core/webpack:/Survey/src/dropdownListModel.ts:350:31)
    at QuestionDropdownModel.get (/home///backend/node_modules/survey-core/webpack:/Survey/src/question_dropdown.ts:266:37)
    at QuestionDropdownModel.get (/home///backend/node_modules/survey-core/webpack:/Survey/src/question_dropdown.ts:274:17)
    at QuestionDropdownModel../src/question_dropdown.ts.QuestionDropdownModel.onVisibleChoicesChanged (/home///backend/node_modules/survey-core/webpack:/Survey/src/question_dropdown.ts:313:41)
    at QuestionDropdownModel../src/question_baseselect.ts.QuestionSelectBase.onSurveyLoad (/home///backend/node_modules/survey-core/webpack:/Survey/src/question_baseselect.ts:1349:10)
    at PageModel../src/panel.ts.PanelModelBase.onSurveyLoad (/home///backend/node_modules/survey-core/webpack:/Survey/src/panel.ts:1020:24)
    at SurveyModel../src/survey.ts.SurveyModel.doElementsOnLoad (/home///backend/node_modules/survey-core/webpack:/Survey/src/survey.ts:5811:21)
    at SurveyModel../src/survey.ts.SurveyModel.endLoadingFromJson (/home///backend/node_modules/survey-core/webpack:/Survey/src/survey.ts:6106:10)
    at JsonObject../src/jsonobject.ts.JsonObject.toObjectCore (/home///backend/node_modules/survey-core/webpack:/Survey/src/jsonobject.ts:1651:11)
    at JsonObject../src/jsonobject.ts.JsonObject.toObject (/home///backend/node_modules/survey-core/webpack:/Survey/src/jsonobject.ts:1611:10)
@JaneSjs JaneSjs added bug user issue An issue or bug reported by users labels Feb 12, 2024
andrewtelnov added a commit that referenced this issue Feb 12, 2024
tsv2013 pushed a commit that referenced this issue Feb 12, 2024
#7856)

* ReferenceError: document is not defined is thrown on an attempt to generate a SurveyModel on a server-side fix #7855

* Add more checks on document undefined #7855
@RomanTsukanov RomanTsukanov changed the title ReferenceError: document is not defined is thrown on an attempt to generate a SurveyModel on a server-side A ReferenceError is thrown on an attempt to generate a SurveyModel on a server Feb 13, 2024
@OlgaLarina OlgaLarina added this to the v1.9.130 milestone Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug user issue An issue or bug reported by users
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants