Skip to content

Commit ab915aa

Browse files
authored
Merge pull request #48 from queenvictoria/master
Prevent crash when attributeConfig is null or undefined.
2 parents 87afc0b + dc82308 commit ab915aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/mongoHandler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ MongoStore.prototype._getSearchCriteria = function(request) {
8181
var values = filter[attribute].map(MongoStore._filterElementToMongoExpr);
8282
var attributeConfig = self.resourceConfig.attributes[attribute];
8383
// Relationships need to be queried via .id
84-
if (attributeConfig._settings) {
84+
if (attributeConfig && attributeConfig._settings) {
8585
attribute += ".id";
8686
}
8787
values = values.reduce(function(mongoExpressions, mongoExpr) {

0 commit comments

Comments
 (0)