Commit 3aafcbd7 authored by GoshaZotov's avatar GoshaZotov

modify matching function

parent 525ca570
...@@ -5806,8 +5806,7 @@ function parseNum( str ) { ...@@ -5806,8 +5806,7 @@ function parseNum( str ) {
var operator = matchingInfo.op; var operator = matchingInfo.op;
var res = false, rS; var res = false, rS;
if (cElementType.string === y.type) { if (cElementType.string === y.type) {
if (cElementType.number === y.type && if ('<' === operator || '>' === operator || '<=' === operator || '>=' === operator) {
('<' === operator || '>' === operator || '<=' === operator || '>=' === operator)) {
var _funcVal = _func[x.type][y.type](x, y, operator); var _funcVal = _func[x.type][y.type](x, y, operator);
if (cElementType.error === _funcVal.type) { if (cElementType.error === _funcVal.type) {
return false; return false;
...@@ -5821,7 +5820,14 @@ function parseNum( str ) { ...@@ -5821,7 +5820,14 @@ function parseNum( str ) {
rS = (cElementType.empty === x.type); rS = (cElementType.empty === x.type);
} else { } else {
// Equal only string values // Equal only string values
rS = (cElementType.string === x.type) ? searchRegExp2(x.value, y) : false; if(cElementType.bool === x.type){
x = x.tocString();
rS = x.value === y;
}else if(cElementType.error === x.type){
rS = x.value === y;
}else{
rS = (cElementType.string === x.type) ? searchRegExp2(x.value, y) : false;
}
} }
switch (operator) { switch (operator) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment