function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
edoardo_spanoedoardo_spano 

Uncaught rerender threw an error in 'markup://c:QuotePath' [rerender threw an error in 'markup://aura:expression' [TypeError: Cannot read property 'childNodes' of null]]

Hi all,
I built a component, which has a function that create a component with the function $A.createComponent, but I get an error when I try to call the function for the second time.

This is the error: Uncaught rerender threw an error in 'markup://c:QuotePath' [rerender threw an error in 'markup://aura:expression' [TypeError: Cannot read property 'childNodes' of null]]

This is the function mentioned above:
showModal : function (component, event) {
	var eventTarget = event.target;
	if(eventTarget.tagName == "SPAN") eventTarget = eventTarget.parentElement;
	var toggleEnabled = eventTarget.dataset.active != "false";
	if(toggleEnabled) {
		$A.createComponent(
			"c:ModalStatoPreventivazione",
			{
				"aura:id"	: eventTarget.dataset.modalid+"-container",
				"recordId"	: component.get("v.recordId")
			},
			function(newModal) {
				if (component.isValid()) {
					var body = component.get("v.body");
					body.push(newModal);
					component.set("v.body", body);
				}
			}
		);
	}
},

Can someone give a solution for this issue?

Thanks in advance
Best regards
Edoardo