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

@ -733,7 +733,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)

2
dist/recline.js vendored
View File

@ -1038,7 +1038,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)

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)