Closed admtnnr closed 3 months ago
@all-contributors please add @admtnnr for code
@harttle
@admtnnr already contributed before to code
:tada: This PR is included in version 10.14.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Context
I noticed an inconsistency with drops where a drop's value will go through normal value resolution if used in an expression like
if drop > 10
, but it does not if the drop is the only part of the expression likeif drop
which causes it to always evaluate as truthy (because it's an object).Shopify's Liquid implementation doesn't seem to support functionality similar to that of
valueOf
that we have in Liquid.js, so there's not prior art we can rely on there. Given if does seem to callvalueOf
when used with some type of operator I opted to make the bare drop case consistent with the existing behavior.