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

FIO-9499 Component: Check if ref is instance of NodeList on detach #5972

Merged
merged 1 commit into from
Jan 24, 2025

Conversation

blakekrammes
Copy link
Contributor

@blakekrammes blakekrammes commented Jan 7, 2025

Link to Jira Ticket

closely related, but not directly responsible for the initial bug. It was discovered while working on:

https://formio.atlassian.net/browse/FIO-9499

Description

What changed?

Updated check from typeof ref === NodeList to ref instanceof NodeList since the former returns 'object' and not what we're checking for 'NodeList'.

Screenshot 2025-01-08 at 1 07 42 PM

Why have you chosen this solution?

So that the result of this conditional is what we're expecting.

Breaking Changes / Backwards Compatibility

n/a

Dependencies

n/a

How has this PR been tested?

Manual testing + automated test in formio repo formio/formio#1885.

Checklist:

  • I have completed the above PR template
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (if applicable)
  • My changes generate no new warnings
  • My changes include tests that prove my fix is effective (or that my feature works as intended)
  • New and existing unit/integration tests pass locally with my changes
  • Any dependent changes have corresponding PRs that are listed above

   - typeof NodeList will be 'object'; what we want is instanceof
@blakekrammes blakekrammes changed the title FIO-9499 Component: Check for existence of window.NodeList on detach FIO-9499 Component: Check if ref is instance of NodeList on detach Jan 16, 2025
@brendanbond brendanbond merged commit 7700fa1 into master Jan 24, 2025
5 checks passed
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.

2 participants