Skip to content

Conversation

@ArturSharapov
Copy link
Contributor

@ArturSharapov ArturSharapov commented Jun 22, 2024

This PR fixes quite an obvious bug (an unexpected behavior) in case an argument passed is 0.
The 0 itself is a valid value for the affected arguments COUNT and, most importantly, BLOCK.

  • COUNT 0 should return an empty list (source)
  • BLOCK 0 means to never timeout (source)

However, these arguments are currently omitted entirely when their value is 0.
This is caused by checking the argument values for being truthy that 0 is not a part of.

Proposed changes

Explicitly check argument values for not being undefined (which is the only alternative value other than a number, according to the type definitions).

@uki00a uki00a added the bug Something isn't working label Jun 29, 2024
@uki00a uki00a merged commit dc6c4b3 into denodrivers:master Jun 29, 2024
@uki00a
Copy link
Member

uki00a commented Jun 29, 2024

LGTM! Thanks!

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

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants