Skip to content
This repository was archived by the owner on Apr 29, 2025. It is now read-only.

Commit 34a126b

Browse files
committed
fix(config): allow database to be undefined in uri
1 parent 8c6a146 commit 34a126b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ function parseUri(connectionString: string) {
5656
password: authTarget[1] || undefined,
5757
host: splitMatchGroups[3],
5858
port: parseInt(splitMatchGroups[4]),
59-
database: splitMatchGroups[5].replace(/^\/+/, ''),
59+
database: splitMatchGroups[5]?.replace(/^\/+/, ''),
6060
...(splitMatchGroups[6] &&
6161
splitMatchGroups[6].split('&').reduce<Record<string, string>>((connectionInfo, parameter) => {
6262
const [key, value] = parameter.split('=');

0 commit comments

Comments
 (0)