[FIX] don't make explicit boolean comparisons without identity
In javascript, '0 == false', '1 == true' and even '"1" == true'. Either use variables directly in a boolean context, or use type-strict equality (===) to ensure the variable is an actual boolean, not some other type coerced to a boolean bzr revid: xmo@openerp.com-20110617092436-s8b5v4v5ytbonvi1
This commit is contained in:
parent
933272263b
commit
c5e061fec9
|
@ -250,7 +250,7 @@ openerp.base_graph.GraphView = openerp.base.Controller.extend({
|
|||
template:function(obj){
|
||||
if(x_ax['template']){
|
||||
var val = obj[x_ax['template']];
|
||||
val = (typeof val == 'object')?val[1]:(val==false?'Undefined':val);
|
||||
val = (typeof val == 'object')?val[1]:(!val?'Undefined':val);
|
||||
return val;
|
||||
}else{
|
||||
return obj;
|
||||
|
@ -263,7 +263,7 @@ openerp.base_graph.GraphView = openerp.base.Controller.extend({
|
|||
template:function(obj){
|
||||
if(y_ax['template']){
|
||||
var vals = obj[y_ax['template']];
|
||||
vals = (typeof vals == 'object')?vals[1]:(vals==false?'Undefined':vals);
|
||||
vals = (typeof vals == 'object')?vals[1]:(!vals?'Undefined':vals);
|
||||
return vals;
|
||||
}else{
|
||||
return obj;
|
||||
|
|
Loading…
Reference in New Issue