Skip to content

Conversation

@andershagbard
Copy link
Contributor

@andershagbard andershagbard commented Oct 10, 2025

  • Updated nil_safe_compare to treat booleans
  • Added tests to verify correct sorting of arrays containing boolean values and nils.

Solves weird hacks like this:

{% liquid
  assign available_variants = product.variants | where: 'available', true
  assign unavailable_variants = product.variants | where: 'available', false
  assign sorted_variants = available_variants | concat: unavailable_variants

Unsure why I didn't get a fresh master branch when creating this branch. Sorry...

charlespwd and others added 6 commits September 10, 2024 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants