From 70a464fb83b06ad7fdd0a533eda0f78244ef22c4 Mon Sep 17 00:00:00 2001 From: Linden <65407488+thelindat@users.noreply.github.com> Date: Thu, 3 Nov 2022 05:05:43 +1100 Subject: [PATCH] fix(src/config): only parse JSON for valid connection fields Should have set valid keys in the first place. Resolves #147 --- .github/FUNDING.yml | 1 - src/config/index.ts | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) delete mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index a57fc0e..0000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1 +0,0 @@ -ko_fi: dunak diff --git a/src/config/index.ts b/src/config/index.ts index 4a66c4e..dc2656b 100644 --- a/src/config/index.ts +++ b/src/config/index.ts @@ -72,13 +72,12 @@ export const connectionOptions = (() => { options.namedPlaceholders = options.namedPlaceholders === 'false' ? false : true; - for (const key in options) { + for (const key in ['dateStrings', 'flags', 'ssl']) { const value = options[key]; if (typeof value === 'string') { try { options[key] = JSON.parse(value); - console.log(key, options[key]); } catch {} } }