-
Notifications
You must be signed in to change notification settings - Fork 0
‐Resolves #4570 Repeat is not shown in hierarchy view…
You're absolutely right, isFirst
is unnecessary because it's tested further down so that non-empty repeats after the first are skipped anyway. I felt my updated logic was a bit fishy but couldn't spot exactly how.
To check this I've temporarily reinstated my original form and test (which initially caused difficulties - see below). I've simplified the code to match your suggestion, and both tests still pass. Tweak it further at L608 to restore the current logic, and both fail.
The problem with the reinstatement seemed to be that the two test forms had different names but the same ID, breaking the whole test class in random ways. Adding _A to the ID of my form certainly fixed everything definitively.
I actually put it here specifically to emphasise the updated logic, but happy to move it or indeed leave it out. Though I do find comments like this helpful when reading code, as quick hints that there's been an update and why.
Probably a good thing as my code here is pure copy and paste, I've no idea as to how it works.
Of course two of them are now unnecessary!