mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-01 14:38:50 +00:00
fix(config): allow database to be undefined in uri
This commit is contained in:
1 parent
8c6a14645f
commit
34a126be44
1 file changed
+1
-1
+1
-1
@@ -56,7 +56,7 @@ function parseUri(connectionString: string) {
|
||||
password: authTarget[1] || undefined,
|
||||
host: splitMatchGroups[3],
|
||||
port: parseInt(splitMatchGroups[4]),
|
||||
database: splitMatchGroups[5].replace(/^\/+/, ''),
|
||||
database: splitMatchGroups[5]?.replace(/^\/+/, ''),
|
||||
...(splitMatchGroups[6] &&
|
||||
splitMatchGroups[6].split('&').reduce<Record<string, string>>((connectionInfo, parameter) => {
|
||||
const [key, value] = parameter.split('=');
|
||||
|
||||
Reference in new issue
Block a user