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

Commit

Permalink
Merge pull request #89 from balderdashy/select-fix
Browse files Browse the repository at this point in the history
[patch] fix to not use lodash method incorrectly
  • Loading branch information
particlebanana committed Apr 11, 2016
2 parents da40666 + fc03cf3 commit 95b0a08
Showing 1 changed file with 4 additions and 4 deletions.
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

0 comments on commit 95b0a08

Please sign in to comment.