[backend/memory,bugfix][xs]: fix error on memory filtering when field value is null (cannot call toString).
This commit is contained in:
@@ -158,7 +158,8 @@ this.recline.Backend = this.recline.Backend || {};
|
|||||||
_.each(terms, function(term) {
|
_.each(terms, function(term) {
|
||||||
var foundmatch = false;
|
var foundmatch = false;
|
||||||
dataset.fields.each(function(field) {
|
dataset.fields.each(function(field) {
|
||||||
var value = rawdoc[field.id].toString();
|
var value = rawdoc[field.id];
|
||||||
|
if (value !== null) { value = value.toString(); }
|
||||||
// TODO regexes?
|
// TODO regexes?
|
||||||
foundmatch = foundmatch || (value === term);
|
foundmatch = foundmatch || (value === term);
|
||||||
// TODO: early out (once we are true should break to spare unnecessary testing)
|
// TODO: early out (once we are true should break to spare unnecessary testing)
|
||||||
|
|||||||
Reference in New Issue
Block a user