Skip to content
This repository has been archived by the owner on Aug 13, 2021. It is now read-only.

[patch] fix to not use lodash method incorrectly #89

Merged
merged 1 commit into from
Apr 11, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions sequel/where.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,12 +244,12 @@ WhereBuilder.prototype.complex = function complex(queryObject, options) {

// Find the projection in the schema and make sure it's a valid key
// that can be selected.
var schema = _.find(self.schema[projection.table]);
if(!schema) {
var schema = self.schema[projection.table];
if(!schema || !schema.definition) {
return;
}

var schemaVal = schema[projection.key];
var schemaVal = schema.definition[projection.key];
if(!schemaVal) {
return;
}
Expand Down Expand Up @@ -347,7 +347,7 @@ WhereBuilder.prototype.complex = function complex(queryObject, options) {

// Find the projection in the schema and make sure it's a valid key
// that can be selected.
var schema = _.find(self.schema[projection.table]);
var schema = self.schema[projection.table];
if(!schema) {
return;
}
Expand Down