It's quite simple obviously fields can not only be null but also
undefined....
This commit is contained in:
Michael Bauer
2012-09-13 14:50:25 +02:00
parent 881fee5fe7
commit fbea51030b
3 changed files with 3 additions and 3 deletions

View File

@@ -148,7 +148,7 @@ this.recline.Backend.Memory = this.recline.Backend.Memory || {};
var foundmatch = false;
_.each(self.fields, function(field) {
var value = rawdoc[field.id];
if (value !== null) {
if ((value !== null) && (value !== undefined)) {
value = value.toString();
} else {
// value can be null (apparently in some cases)