Skip to content

Conversation

MichaelWest22
Copy link
Collaborator

@MichaelWest22 MichaelWest22 commented Jul 27, 2025

Description

The null check in getRelatedFormData was removed recently so it no longer checks if the form is null before returning its internalData. This function can only run on click events for buttons inside forms so this situation should never happen. But it turns out that if during a click event handler you remove the button from the dom then it loses its form and the htmx click handler then throws an exception. The exception doesn't cause any issues its just annoying.

The check was removed because It came up in line of code coverage testing and I was unable to trigger it here. I've now added a simple test that triggers it to maintain 100% code coverage.

Corresponding issue:
#3393

Testing

Added regression test to cover this situation

Checklist

  • I have read the contribution guidelines
  • I have targeted this PR against the correct branch (master for website changes, dev for
    source changes)
  • This is either a bugfix, a documentation update, or a new feature that has been explicitly
    approved via an issue
  • I ran the test suite locally (npm run test) and verified that it succeeded

@MichaelWest22 MichaelWest22 added bug Something isn't working ready for review Issues that are ready to be considered for merging labels Jul 27, 2025
@1cg 1cg merged commit 448db78 into bigskysoftware:dev Jul 27, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ready for review Issues that are ready to be considered for merging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants