Skip to content

Commit 0246bbd

Browse files
author
Roman Fromrome
committed
fixed thrown error check
1 parent 62c0c2e commit 0246bbd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/ORM.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ exports.connect = function (opts, cb) {
134134
db.emit("connect", err, !err ? db : null);
135135
});
136136
} catch (ex) {
137-
if (ex.code === "MODULE_NOT_FOUND" || ex.message.indexOf('find module')) {
137+
if (ex.code === "MODULE_NOT_FOUND" || ex.message.indexOf('find module') > 0) {
138138
return ORM_Error(new ORMError("Connection protocol not supported - have you installed the database driver for " + proto + "?", 'NO_SUPPORT'), cb);
139139
}
140140
return ORM_Error(ex, cb);

0 commit comments

Comments
 (0)