another fix for '/foo', '/=foo' and '/unknown=foo'
This commit is contained in:
parent
bf533cd2fe
commit
0994a6243f
1 changed files with 7 additions and 9 deletions
|
@ -308,16 +308,14 @@ Ox.URL = function(options) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (!condition.operator) {
|
condition.key = condition.key || '*';
|
||||||
// missing operator
|
if (
|
||||||
condition = {key: '*', value: condition.value, operator: '='};
|
!condition.operator
|
||||||
} else if (!condition.key) {
|
|| Ox.getPositionById(self.options.findKeys, condition.key) == -1
|
||||||
// missing key
|
) {
|
||||||
condition.key = '*';
|
// missing operator or unknown key
|
||||||
} else if (Ox.getPositionById(self.options.findKeys, condition.key) == -1) {
|
|
||||||
// unknown key
|
|
||||||
condition = {key: '*', value: str, operator: '='};
|
condition = {key: '*', value: str, operator: '='};
|
||||||
}
|
}
|
||||||
if (['=', '!='].indexOf(condition.operator) > -1) {
|
if (['=', '!='].indexOf(condition.operator) > -1) {
|
||||||
if (condition.value[0] == '*') {
|
if (condition.value[0] == '*') {
|
||||||
condition.value = condition.value.substr(1);
|
condition.value = condition.value.substr(1);
|
||||||
|
|
Loading…
Reference in a new issue