Skip to content

Commit

Permalink
FIO-9499 Component: Check for existence of window.NodeList on detach
Browse files Browse the repository at this point in the history
  - Edit Grids were not able to send their values in emails because when the renderer was called via server code in formio, window.NodeList was not defined and threw an error
  • Loading branch information
blakekrammes committed Jan 7, 2025
1 parent 5196d70 commit f3a71a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/_classes/component/Component.js
Original file line number Diff line number Diff line change
Expand Up @@ -1480,7 +1480,7 @@ export default class Component extends Element {
detach() {
// First iterate through each ref and delete the component so there are no dangling component references.
_.each(this.refs, (ref) => {
if (typeof ref === NodeList) {
if (window?.NodeList && typeof ref === NodeList) {
ref.forEach((elem) => {
delete elem.component;
});
Expand Down

0 comments on commit f3a71a8

Please sign in to comment.