fix(src/config): only parse JSON for valid connection fields

Should have set valid keys in the first place.
Resolves #147
This commit is contained in:
Linden committed 2022-11-03 05:08:00 +11:00
1 parent c292cb44b0
commit 70a464fb83
2 files changed
+1 -3

No files matched your search

-1
View File
@@ -1 +0,0 @@
ko_fi: dunak
+1 -2
View File
@@ -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 {}
}
}