surveyjs / survey-pdf

Supplementary component to the SurveyJS Form Library to download surveys as PDF files and generate editable PDF forms.
https://surveyjs.io/pdf-generator/examples/survey-pdf-export/
Other
58 stars 29 forks source link

The 'Uncaught (in promise): TypeError: Cannot read properties of undefined (reading 'render')' exception is thrown when running custom PDF brick rendering using the TextFieldBrick #310

Closed JaneSjs closed 3 months ago

JaneSjs commented 3 months ago

T17445 - textBrick.render() throws an error https://surveyjs.answerdesk.io/internal/ticket/details/T17445


View CodeSandbox The following exception is thrown when using a custom brick rendering:

index.js:27 ERROR Error: Uncaught (in promise): TypeError: Cannot read properties of undefined (reading 'render')
TypeError: Cannot read properties of undefined (reading 'render')
    at TextFieldBrick.eval (pdf_textfield.ts:64:34)
    at step (helpers.ts:83:23)
    at Object.eval [as next] (helpers.ts:64:63)
    at eval (helpers.ts:57:71)
    at new ZoneAwarePromise (zone.js:1429:21)
    at __awaiter (helpers.ts:53:12)
    at TextFieldBrick.renderReadOnly (pdf_textfield.ts:58:5)
 ...
JaneSjs commented 3 months ago

The updated code is available in the original support thread.