Skip to content

Commit

Permalink
core: evaluate 'and'/'or' as 'andalso' and 'orelse'. Fixes #1561
Browse files Browse the repository at this point in the history
  • Loading branch information
mworrell committed Jan 10, 2017
1 parent 94054b7 commit 0e298fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/erlydtl/erlydtl_operators.erl
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@


'and'(A, B, Context) ->
erlydtl_runtime:is_true(A, Context) and erlydtl_runtime:is_true(B, Context).
erlydtl_runtime:is_true(A, Context) andalso erlydtl_runtime:is_true(B, Context).

'not'(A, Context) ->
erlydtl_runtime:is_false(A, Context).

'or'(A, B, Context) ->
erlydtl_runtime:is_true(A, Context) or erlydtl_runtime:is_true(B, Context).
erlydtl_runtime:is_true(A, Context) orelse erlydtl_runtime:is_true(B, Context).

'xor'(A, B, Context) ->
erlydtl_runtime:is_true(A, Context) xor erlydtl_runtime:is_true(B, Context).
Expand Down

0 comments on commit 0e298fe

Please sign in to comment.