refactor(limitTo): no need for all those checks if we use slice

Closes #10537