Skip to content

Commit

Permalink
Fix typo in the lib run method
Browse files Browse the repository at this point in the history
  • Loading branch information
shvetsovdm committed Jun 22, 2017
1 parent a89d8df commit 0788f57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export default class Migrator {

const untilMigration = migrationName ?
await MigrationModel.findOne({name: migrationName}) :
await MigrationModel.findOne().sort({createdAt: directions == 'up' ? -1 : 1});
await MigrationModel.findOne().sort({createdAt: direction === 'up' ? -1 : 1});

if (!untilMigration) {
if (migrationName) throw new ReferenceError("Could not find that migration in the database");
Expand Down

0 comments on commit 0788f57

Please sign in to comment.