Skip to content

Commit

Permalink
fixed linting
Browse files Browse the repository at this point in the history
  • Loading branch information
filepounder committed Dec 9, 2021
1 parent bbd0c76 commit 8638b0b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions lib/MongoFunctions.js
Original file line number Diff line number Diff line change
Expand Up @@ -1113,8 +1113,8 @@ class AllowableFunctions {
parameters[i] && parameters[i].$literal
? parameters[i].$literal
: parameters[i].startsWith && parameters[i].startsWith('$')
? parameters[i].substring(1)
: '';
? parameters[i].substring(1)
: '';
if (!fieldName) throw new Error('Invalid parameter for field names');

if (i === parameters.length - 1) {
Expand Down Expand Up @@ -1167,8 +1167,8 @@ class AllowableFunctions {
parameters[i] && parameters[i].$literal
? parameters[i].$literal
: parameters[i].startsWith && parameters[i].startsWith('$')
? parameters[i].substring(1)
: '';
? parameters[i].substring(1)
: '';
if (!fieldName) throw new Error('Invalid parameter for field names');

if (i === parameters.length - 1) {
Expand Down
8 changes: 4 additions & 4 deletions lib/SQLParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -498,15 +498,15 @@ class SQLParser {
(fromTable && join.on.left.table === fromTable) || (fromAs && join.on.left.table === fromAs)
? `${localTable ? localTable + '.' : ''}${join.on.left.column}`
: join.on.right.table === fromTable || join.on.right.table === fromAs
? `${localTable ? localTable + '.' : ''}${join.on.right.column}`
: `${localTable ? localTable + '.' : ''}${join.on.right.column}`;
? `${localTable ? localTable + '.' : ''}${join.on.right.column}`
: `${localTable ? localTable + '.' : ''}${join.on.right.column}`;

const foreignField =
join.on.left.table === toTable || join.on.left.table === toAs
? join.on.left.column
: join.on.right.table === toTable || join.on.right.table === toAs
? join.on.right.column
: join.on.left.column;
? join.on.right.column
: join.on.left.column;

pipeline.push({
$lookup: {
Expand Down

0 comments on commit 8638b0b

Please sign in to comment.