BUG: IF & Switch nodes are malfunctioning

Describe the issue/error/question

The IF node is resulting in a True when it should be False.

Below is an example of the flow from a live use-case.

Please share the workflow

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 0.207.1
  • Database you’re using (default: SQLite): postgres
  • Running n8n with the execution process [own(default), main]: main
  • Running n8n via [Docker, npm, n8n.cloud, desktop app]: docker

Try to equal or more than 1

Maybe check for empty value? i think 0 because empty. Yeah strange.

explicit typecasting doesn’t work either:

Same issue with the Switch node:

Hi @shrey-42, thank you so much for reporting this. I’ve added it to our internal bug tracker for a fix.

Hi @MutedJam , forgot to post an update: i did figure out that the issue isn’t completely with IF/Switch nodes, in this case.

The incoming data isn’t actually empty even though the UI shows it as such (found out after i console logged it).

It appears empty in the UI because the only existing property’s value is undefined.

And that links us back to this earlier reported bug:

So, i think there are 2 issues now:

  1. Misrepresentation of incoming properties & values in the UI
  2. Misrepresentation of non-empty value in the Preview section of the value, in the IF & the Switch nodes.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.