Strange behaviour with ~variable && ~variable^length > 0, where ~variable = ~getVariable()
See original GitHub issuePlease, take a look at following fiddle: https://jsfiddle.net/nq4372t8/26/
There, as you can see, are 4 different “ways” to describe logic of checking some value.
First two ways do ~t=item
, and second two ways do ~t=getItem()
.
1-st and 3-rd ways are checking result in variable with one if
tag, as {^{if ~t && ~t^length>0}} ...
.
2-nd and 4-th ways are checking result in variable with two if
tags, as {^{if ~t}} {^{if ~t^length>0}} ...
.
The question is: why does jsrender conider result of {^{if ~t && ~t^length>0}}
as false
in 3-rd example? We think, it is similar to other examples. Is it correct? If it is, then what point do we miss?
Thanks.
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Weird behaviour with variable length arrays in struct in C
There is no variable length array in your code. What you do is called flxeible array member (FAM). How do you think malloc...
Read more >Really strange behavior using variables in MySql query
MySQL user variables are session-specific. Now why the 5.5 fiddle does not start with NULL - I suppose the fiddle runs EXPLAIN on...
Read more >Dynamic behavior in Svelte: working with variables and props
In this article we'll be using variables and props to make our app dynamic, allowing us to add and delete to-dos, mark them...
Read more >Groovy Language Documentation
The reserved keywords can't in general be used for variable, field and method ... if (string!=null && string.length()>0) { result = 'Found' }...
Read more >Component variables on Unity UI objects - Adventure Creator
GetVariable (12) is the global variable that keeps track of the in-game time. So as time moves forward, most posts will be automatically...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, good catch, thank you. It is a bug. I am working on a fix. I’ll let you know…
Resolved in commit 88