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

Commit

Permalink
fix to not use lodash method incorrectly
Browse files Browse the repository at this point in the history
my brain must have been mush when this was written
  • Loading branch information
particlebanana committed Apr 11, 2016
1 parent da40666 commit fc03cf3
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

1 comment on commit fc03cf3

@acekat
Copy link
Contributor

@acekat acekat commented on fc03cf3 May 20, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@particlebanana, aren't you missing those changes too ?
line 351 => if(!schema || !schema.definition) {
line 355 => var schemaVal = schema.definition[projection.key];

Please sign in to comment.