Skip to content

Commit

Permalink
fix: isFilter
Browse files Browse the repository at this point in the history
fix: #6 
TypeError: this.adapter.isFiltered is not a function
  • Loading branch information
17bit authored Feb 14, 2021
1 parent e9efc9e commit 3b21251
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class MongoAdapter implements Adapter {
return a;
}

public isFiltered: boolean = false;
public useFilter: boolean = false;

private readonly dbName: string;
private readonly mongoClient: MongoClient;
Expand All @@ -57,7 +57,7 @@ export class MongoAdapter implements Adapter {
// Cache the mongo uri and db name for later use
this.dbName = dbName;
this.collectionName = collectionName;
this.isFiltered = filtered;
this.useFilter = filtered;

try {
// Create a new MongoClient
Expand Down Expand Up @@ -92,7 +92,7 @@ export class MongoAdapter implements Adapter {
try {
let lines;

if (this.isFiltered) {
if (this.useFilter) {
lines = await this.getCollection()
.find(filter)
.toArray();
Expand Down

0 comments on commit 3b21251

Please sign in to comment.