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

Component: Dialog - problem with SSR during set the modal mode. #15352

Closed
kusmierczykw opened this issue Apr 24, 2024 · 0 comments
Closed

Component: Dialog - problem with SSR during set the modal mode. #15352

kusmierczykw opened this issue Apr 24, 2024 · 0 comments
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@kusmierczykw
Copy link

kusmierczykw commented Apr 24, 2024

Describe the bug

During build application with SSR mode there is a problem with access to the document, because the document object is not avaible on the server side.

ReferenceError: document is not defined
at _Dialog.disableModality (/app/node_modules/primeng/fesm2022/primeng-dialog.mjs:854:30)
at _Dialog.onContainerDestroy (/app/node_modules/primeng/fesm2022/primeng-dialog.mjs:1172:12)
at document (/app/node_modules/primeng/fesm2022/primeng-dialog.mjs:1195:12)
at executeOnDestroys (/app/node_modules/@angular/core/fesm2022/core.mjs:10462:32)
at cleanUpView (/app/node_modules/@angular/core/fesm2022/core.mjs:10365:9)
at destroyViewTree (/app/node_modules/@angular/core/fesm2022/core.mjs:10193:21)
at destroyLView (/app/node_modules/@angular/core/fesm2022/core.mjs:10338:9)
at ViewRef$1.destroy (/app/node_modules/@angular/core/fesm2022/core.mjs:13127:9)
at eval (/app/node_modules/@angular/core/fesm2022/core.mjs:31588:56)
at Array.forEach ()

Angular version

17.3.0

PrimeNG version

17.12.0

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

v20.11.1

Steps to reproduce the behavior

Set the [modal] property during using Angular with SSR support.

<p-dialog
  [modal]="true"
  [visible]="true">

// Content of the dialog
</p-dialog>

Expected behavior

No response

@kusmierczykw kusmierczykw added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Apr 24, 2024
@kusmierczykw kusmierczykw closed this as not planned Won't fix, can't repro, duplicate, stale Apr 24, 2024
@kusmierczykw kusmierczykw reopened this Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
Development

No branches or pull requests

1 participant