5

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)

3
  • Did you find an answer to this? I am still stuck also and have read all similar posts!
    – dacology
    Commented Mar 14, 2017 at 17:00
  • @dacology, nope. Commented Mar 15, 2017 at 6:55
  • I'm also stuck with this arbitrary error.
    – kev_panda
    Commented Mar 21, 2017 at 19:19

2 Answers 2

1

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.

-1

You should try something like this

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

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

<aura:iteration>
<span>
  <li>
  </li>
</span>
</aura:iteration>
</ul>
</aura:if>
1
  • Why would adding a span around the <li> elements make any difference?
    – Matt Lacey
    Commented Apr 28, 2017 at 5:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .