Fix error when loading a saved search with an empty 'is/isNot' text condition
Fix 'null' appearing in saved search window when editing a search with an empty 'is/isNot' text condition
This commit is contained in:
parent
e7203d4c67
commit
7471c9dc73
|
@ -542,7 +542,9 @@
|
||||||
|
|
||||||
this.mode = condition['mode'];
|
this.mode = condition['mode'];
|
||||||
this.id('operatorsmenu').value = condition['operator'];
|
this.id('operatorsmenu').value = condition['operator'];
|
||||||
this.value = prefix + condition['value'];
|
this.value = prefix +
|
||||||
|
(condition.value ? condition.value : '');
|
||||||
|
|
||||||
this.dontupdate = false;
|
this.dontupdate = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1142,7 +1142,8 @@ Zotero.Search.prototype._buildQuery = function(){
|
||||||
case 'isNot': // excluded with NOT IN above
|
case 'isNot': // excluded with NOT IN above
|
||||||
// Automatically cast values which might
|
// Automatically cast values which might
|
||||||
// have been stored as integers
|
// have been stored as integers
|
||||||
if (condition.value.match(/^[1-9]+[0-9]*$/)) {
|
if (condition.value
|
||||||
|
&& condition.value.match(/^[1-9]+[0-9]*$/)) {
|
||||||
condSQL += ' LIKE ?';
|
condSQL += ' LIKE ?';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user