Skip to content

Conversation

@tlabaj
Copy link
Contributor

@tlabaj tlabaj commented Jun 25, 2024

What: Closes #10410

@tlabaj tlabaj requested review from a team, kmcfaul and wise-king-sullyman and removed request for a team June 25, 2024 20:48
@patternfly-build
Copy link
Contributor

patternfly-build commented Jun 25, 2024

@dlabaj dlabaj merged commit 5925ef1 into patternfly:main Jul 8, 2024
Comment on lines +174 to +175
if (this.expandableContentRef) {
const { offsetWidth } = this.expandableContentRef.current;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this fix work?
this.expandableContentRef is assigned as a class property:
expandableContentRef = React.createRef<HTMLDivElement>();
Therefore this.expandableContentRef is always an object. However expandableContentRef.current may be null.

Therefore shouldn't the fix be:

if (this.expandableContentRef.current) {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. when i originally pushed a change i had a check to current that is missing here. I will push nother fix so it is included in our up coming release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug - ExpandableSection - Uncaught exception on unmount

6 participants