mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-03 22:20:56 +00:00
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:
1 parent
c292cb44b0
commit
70a464fb83
2 files changed
+1
-3
No files matched your search
@@ -1 +0,0 @@
|
|||||||
ko_fi: dunak
|
|
||||||
+1
-2
@@ -72,13 +72,12 @@ export const connectionOptions = (() => {
|
|||||||
|
|
||||||
options.namedPlaceholders = options.namedPlaceholders === 'false' ? false : true;
|
options.namedPlaceholders = options.namedPlaceholders === 'false' ? false : true;
|
||||||
|
|
||||||
for (const key in options) {
|
for (const key in ['dateStrings', 'flags', 'ssl']) {
|
||||||
const value = options[key];
|
const value = options[key];
|
||||||
|
|
||||||
if (typeof value === 'string') {
|
if (typeof value === 'string') {
|
||||||
try {
|
try {
|
||||||
options[key] = JSON.parse(value);
|
options[key] = JSON.parse(value);
|
||||||
console.log(key, options[key]);
|
|
||||||
} catch {}
|
} catch {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user