Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logical operator consistency #79

Open
PRR24 opened this issue Nov 9, 2020 · 0 comments
Open

Logical operator consistency #79

PRR24 opened this issue Nov 9, 2020 · 0 comments

Comments

@PRR24
Copy link

PRR24 commented Nov 9, 2020

Currently logical operators (like and, or) in the helpers are based on Javascript if operator.
Please consider implementing logical operators bases of the way of Handlebars if operator functions.
So that
{{#if (and a b)}} smth {{/if}} would act 100% as {{#if a}}{{#if b}} smth {{/if}}{{/if}}
Currently there are cases (for example empty array) where these two constructions differ and it may result unexpected behaviour in constructions like:

{{# if (or a b)}}
  Found:
  {{#if a}}Element a{{/if}}
  {{#if b}}Element b{{/if}}
{{/if}}

Thank you.

@PRR24 PRR24 changed the title Logical operattor consistency Logical operator consistency Nov 9, 2020
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

No branches or pull requests

1 participant