kawadhiya21 / mysql-migrations

A tool to use with mysql package to maintain migrations
MIT License
31 stars 25 forks source link

TypeError: cb is not a function #6

Closed Wyox closed 6 years ago

Wyox commented 6 years ago

In some cases the callback function equals undefined which doesn't equal null. Changing the === operator to == makes it check for both null as undefined.

This fixes the usage of migration.init(connection, __dirname + '/migrations'); where otherwise migration.init(connection, __dirname + '/migrations', function(){}); had to be used

kawadhiya21 commented 6 years ago

Thanks