Pricing Blog

Undefined isn't false?

  • ssssadsadasd-1354059347621318656

    ssssadsadasd

    3 months ago

    If [here ](https://toddle.dev/docs/show-hide-formula) it says "We only treat these values as falsy: false, null, and undefined" why when I do "undefined value = false" it returns false? thanks
  • max.kayr-1354062151538577479

    Max

    3 months ago

    „Falsy“ is not false. It just means it is not true. But undefined does not equal false
  • ssssadsadasd-1354072226537672757

    ssssadsadasd

    3 months ago

    @Max ah I thought it meant that it evaluated to false. thanks.
    I managed to solve this with "default to equals to null" which evaluates undefined as null
  • max.kayr-1354073250531119114

    Max

    3 months ago

    That works 🙂 You can also add a "Boolean" node after the value that is undefined. This will give you either true or false. And for falsy values, it will give you false
  • lucasg-1354091728981725314

    Lucas G

    3 months ago

    Worth noting that toddle falsy value are not the same as JS