fluid icon indicating copy to clipboard operation
fluid copied to clipboard

Binary expressions should return the left operand

Open sebastienros opened this issue 1 year ago • 2 comments

Expectations:

  • {{ 2 == 3 }} returns 2
  • {{ 2 == 3 | plus : 10 | minus : 3 }} returns 9

sebastienros avatar Aug 30 '24 01:08 sebastienros

This runs contrary to other languages such as javascript where


const cool = { "colour":  "blue" };
const apples = { "taste": "sweet" };

console.log(cool && apples);

returns

{taste: 'sweet'}

Tho if this is part of the liquid standard that's fine. Just thought I should mention it.

Gryhyphen avatar Dec 13 '24 00:12 Gryhyphen

Tho if this is part of the liquid standard that's fine. Just thought I should mention it.

It is part of the liquid standard ;) Was a shock to me too

sebastienros avatar Dec 13 '24 01:12 sebastienros