[SalesForce] Rerender threw an error in ‘markup://aura:if’ [Cannot read property ‘childNodes’ of null] Failing descriptor: {markup://aura:if}

My If-Iteration structure is similar to written below

<aura:if isTrue="">
<ul>
  <aura:if isTrue="">
  </aura:if>

  <aura:if isTrue="">
  </aura:if>

  <aura:iteration>
   <li>
   </li>
  </aura:iteration>
</ul>
</aura:if>

Everything goes smoothly but when the above div is rerendered then the below-mentioned error comes

rerender threw an error in 'markup://aura:if'

[Cannot read property 'childNodes' of null] Failing descriptor:
{markup://aura:if}

I also tried to wrap in but it does not work. (which was given in this post)

Best Answer

I think you should also try to seperate the aura:if from the aura:iteration using the same technique.

Try something like this:

<aura:if isTrue="">
  <ul>
    <span>
      <aura:if isTrue="">
      </aura:if>
    </span

    <span>
      <aura:if isTrue="">
      </aura:if>
    </span

    <span>
      <aura:iteration>
       <li>
       </li>
      </aura:iteration>
    </span>
  </ul>
</aura:if>

If this does not work, try to determine which aura:if is causing the problem - try to remove the outer and inner aura:if and the aura:iteration statements separately to see if you can alter the rendering behaviour.

Related Topic