Hey there!
I was implementing an API call thanks to Custom Actions and came across this : if there is a boolean property with the value false in the API output, it’s not shown in the outputs properties. Boolean properties with value true do are shown.
I’ve setup a dummy API to reproduce it : https://5fc616164931580016e3c972.mockapi.io/dummy/1
{
"id": "1",
"true_property": true,
"false_property": false,
"null_property": null
}
where true_property is always true, false_property is always false and null_property is always null.
Steps to reproduce
- Add a button component
- Add a new Custom Action on it
- Name it “Test” with type “Create” (doesn’t matter)
- URL : https://5fc616164931580016e3c972.mockapi.io/dummy/1
- Method : GET
- Run test request
Actual behaviour
- The property
false_propertyis not shown in the outputs - If you look at the full response, the property is there
Expected behaviour
- The property
false_propertyshould be in the outputs
Remarks
We see that null values are also ignored. In my opinion, it looks like a typical problem of truthiness check in the implementation:
if (output[property]) {
...
}
instead of
if (output[property] !== null) {
...
}
Could you look into it? Would be happy to help if needed.
Best regards!