Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why do we need to assert that items is not empty? #64

Closed
hbatalhaStch opened this issue Mar 11, 2024 · 1 comment
Closed

why do we need to assert that items is not empty? #64

hbatalhaStch opened this issue Mar 11, 2024 · 1 comment

Comments

@hbatalhaStch
Copy link
Contributor

hbatalhaStch commented Mar 11, 2024

In all constructors there is this assertion:

assert(items!.isNotEmpty, 'Items list must contain at least one item.',),

My question is: why do we do need this? I have a case where the items come from the database and there is a high chance it might be empty so my code will be throwing whenever it returns an empty list from the database.

@AbdullahChauhan
Copy link
Owner

Hi @hbatalhaStch
This assertion removed in latest release 3.1.0. Thanks to you 😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants