Skip to content

Conversation

@Ajayss04
Copy link

@Ajayss04 Ajayss04 commented Apr 4, 2025

Fix(ProductTable): Use continue for correct product filtering

Replaces return with continue within the forEach loop's filter conditions. Using continue correctly skips the current iteration for products that don't match the filters, preventing them from being added to the rows array.
Closes #7698

@rickhanlonii
Copy link
Member

Inside a forEach(), return will continue to the next element, so this change isn't necessary. Will comment on the issue.

@rickhanlonii
Copy link
Member

Actually, TIL continue even errors when used inside forEach(). This is from your change:

Screenshot 2025-05-16 at 2 02 28 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Typo]: Used "return" instead of "continue" in sandbox code

3 participants