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

Fix edge case in ContentsPropertiesModal #6258

Merged
merged 2 commits into from
Aug 16, 2024
Merged

Fix edge case in ContentsPropertiesModal #6258

merged 2 commits into from
Aug 16, 2024

Conversation

davisagli
Copy link
Member

The item can be undefined if it's in this.state.selected but not this.state.items. This can happen after navigating to a different folder.

Copy link

netlify bot commented Aug 16, 2024

Deploy Preview for plone-components canceled.

Name Link
🔨 Latest commit 2164e8b
🔍 Latest deploy log https://app.netlify.com/sites/plone-components/deploys/66bf9cce1ccc5d00085cd147

@ichim-david
Copy link
Member

@davisagli of course you found a bug after backporting to 16 and 17 :)). Talking about bad karma alert :). Maybe a cypress test wouldn't hurt for this functionality

@davisagli
Copy link
Member Author

@ichim-david Yes, I found the bug once I was testing it integrated with a project. I'm not sure a cypress test would have helped in this case, because it's a bit of an obscure one that I probably wouldn't have thought to test.

Are there any existing Cypress tests for the contents view? I looked but didn't find any. We should absolutely have some, but that's a bigger project than I anticipated when I started working on this change to the properties modal.

@davisagli davisagli merged commit fdcc874 into main Aug 16, 2024
69 of 70 checks passed
@davisagli davisagli deleted the 6248-fix-undefined branch August 16, 2024 18:57
davisagli added a commit that referenced this pull request Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants