From 37a3a7cd0a4e6ea94fcf52227c071b28f60b8fcf Mon Sep 17 00:00:00 2001 From: Linden <65407488+thelindat@users.noreply.github.com> Date: Wed, 12 Jul 2023 00:09:00 +1000 Subject: [PATCH] fix(config): don't set connection info with falsey key When using the semicolon connection string, a trailing semicolon displays an error about an invalid configuration option. --- src/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.ts b/src/config.ts index 9e4a90c..6000c24 100644 --- a/src/config.ts +++ b/src/config.ts @@ -72,7 +72,7 @@ export const connectionOptions = (() => { .split(';') .reduce>((connectionInfo, parameter) => { const [key, value] = parameter.split('='); - connectionInfo[key] = value; + if (key) connectionInfo[key] = value; return connectionInfo; }, {});