不要怂,就是干,撸起袖子干!

Commit 82bc0120 by Dallas Read

Update MySQL connect manager (browserify fix).

1 parent 9c82172c
Showing with 5 additions and 1 deletions
...@@ -14,7 +14,11 @@ ConnectionManager = function(dialect, sequelize) { ...@@ -14,7 +14,11 @@ ConnectionManager = function(dialect, sequelize) {
this.sequelize = sequelize; this.sequelize = sequelize;
this.sequelize.config.port = this.sequelize.config.port || 3306; this.sequelize.config.port = this.sequelize.config.port || 3306;
try { try {
this.lib = require(sequelize.config.dialectModulePath || 'mysql'); if (sequelize.config.dialectModulePath) {
this.lib = require(sequelize.config.dialectModulePath);
} else {
this.lib = require('mysql');
}
} catch (err) { } catch (err) {
throw new Error('Please install mysql package manually'); throw new Error('Please install mysql package manually');
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!