PipedreamHQ / PipedreamHQ/pipedream

[BUG] Integer prop with options does not accept 0 as a value

Open
#5,429 1 comment 0 reactions 0 assignees View on GitHub
bug tracked internally triaged
Dominant language
JavaScript
Stars
11.7k
Forks
5.8k
Avg merge
3d 10h
Merged PRs (30d)
102

Description

**Describe the bug**
Integer props normally accept `0` as a valid value, but that is not the case if the value comes from a user-selected `option`.

**To Reproduce**
I've created a sample action at `components/formatting/actions/integer-option-zero-example/` in a branch named [bug-sample_integer-option-zero](https://github.com/PipedreamHQ/pipedream/tree/bug-sample_integer-option-zero) to easily reproduce this. Simply publish that action and enter/select values as shown on the screenshots below.

**Expected behavior**
0 should be a valid value for option-based integer props, since it is valid for integer props without options.

**Screenshots**
Here's an integer prop without options, accepting 0 as a value:
![image](https://user-images.githubusercontent.com/48412907/217424118-b34f0a64-585b-446d-a170-5fb82347d077.png)

And here's an integer prop with options, including one with 0 as a value, which it does not accept as valid:
![image](https://user-images.githubusercontent.com/48412907/217424416-2329139a-9e84-48ab-839e-7f2e2e3e9ee7.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.