p-button-label: Cannot set properties of null (setting 'textContent') #12197
Labels
Status: Needs Triage
Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Edit: This is a regression in PrimeNG 14.2.1
I backed down the version of PrimeNG from 14.2.1 to 14.1.2 and the issue is resolved. The issue persists in 14.2.1.
Describe the bug
I recently upgraded to PrimeNG 14.2.1 and am now running into a strange issue where the call stack lands in PrimeNG code with the error:
Unfortunately, I can't break this down into a reproducer. But I am unsure why PrimeNG is unable to find an element here.
This is a very large Angular application that has been in production for 2+ years without any issue. There have be no changes to the component where this is now failing (of course, the login component of all places).
The call stack shows:
The actual line of code in vendor.js that is failing is:
The highest up I can find in the stack related to our code (main.js) shows it calling in after applying a pipe transform:
This compiled code corresponds with:
This is not an issue with the pipe transform, as it is used all over the system and works correctly.
In this case the login button remains functional but does not apply a label after throwing this error. The remainder of the system seems to be stable.
Again this is a new issue only after updating to the latest PrimeNG 14.2.1.
Environment
Version details below.
Reproducer
No response
Angular version
14.2.9
PrimeNG version
14.2.1
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
16.13.1
Browser(s)
No response
Steps to reproduce the behavior
I am unable to reduce this to a test case for StackBlitz but the call stack clearly shows this landing in PrimeNG code, where it is trying to set a property on a null object.
Expected behavior
This shouldn't be happening.
The text was updated successfully, but these errors were encountered: