Skip to content

Commit fc33c16

Browse files
committed
FIO-9499 Component: Check for existence of window.NodeList on detach
- 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
1 parent 5196d70 commit fc33c16

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/_classes/component/Component.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1480,7 +1480,7 @@ export default class Component extends Element {
14801480
detach() {
14811481
// First iterate through each ref and delete the component so there are no dangling component references.
14821482
_.each(this.refs, (ref) => {
1483-
if (typeof ref === NodeList) {
1483+
if (window?.NodeList && ref instanceof NodeList) {
14841484
ref.forEach((elem) => {
14851485
delete elem.component;
14861486
});

0 commit comments

Comments
 (0)