fix(clickable-images): Limiting the number of iterations, adding card expection - FRONT-4267 #3243
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Eh, we knew that traversing the dom could have been tricky, indeed with the number of iterations needed to find the picture from the content-block in the card, we were breaking all the cases with multiple content-items, for instance.
Now we reduced this number to 1 (meaning two iterations) and we apply an exception for the card, where we actually need another iteration.
I do no like it, but like this might be safe enough, while before it was not.