diff --git a/src/backend/memory.js b/src/backend/memory.js index f79991e8..adf06bab 100644 --- a/src/backend/memory.js +++ b/src/backend/memory.js @@ -158,7 +158,8 @@ this.recline.Backend = this.recline.Backend || {}; _.each(terms, function(term) { var foundmatch = false; dataset.fields.each(function(field) { - var value = rawdoc[field.id].toString(); + var value = rawdoc[field.id]; + if (value !== null) { value = value.toString(); } // TODO regexes? foundmatch = foundmatch || (value === term); // TODO: early out (once we are true should break to spare unnecessary testing)