From 67b28452e8ee441404c6a17f96e6f6dcddfa712d Mon Sep 17 00:00:00 2001 From: Blake Krammes <49688912+blakekrammes@users.noreply.github.com> Date: Tue, 7 Jan 2025 16:38:54 -0600 Subject: [PATCH] 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 --- src/components/_classes/component/Component.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/_classes/component/Component.js b/src/components/_classes/component/Component.js index c6350cfe07..8b9e7f9dad 100644 --- a/src/components/_classes/component/Component.js +++ b/src/components/_classes/component/Component.js @@ -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 && ref instanceof NodeList) { ref.forEach((elem) => { delete elem.component; });