Skip to content

Commit 91485b7

Browse files
committed
Fixes sqlite pathname being undefined
1 parent c75c73e commit 91485b7

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

lib/Drivers/DML/sqlite.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function Driver(config, connection, opts) {
1111
// on Windows, paths have a drive letter which is parsed by
1212
// url.parse() has the hostname. If host is defined, assume
1313
// it's the drive letter and add ":"
14-
this.db = new sqlite3.Database(((config.host ? config.host + ":" : "") + config.pathname) || ':memory:');
14+
this.db = new sqlite3.Database(((config.host ? config.host + ":" : "") + (config.pathname || "")) || ':memory:');
1515
}
1616

1717
var escapes = {

test/common.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ common.getConnectionString = function () {
4747
'@' + (config.host || 'localhost') +
4848
'/' + (config.database || 'orm_test');
4949
case 'sqlite':
50-
return 'sqlite://' + config.pathname;
50+
return 'sqlite://' + (config.pathname || "");
5151
default:
5252
throw new Error("Unknown protocol");
5353
}

0 commit comments

Comments
 (0)