mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-02 14:38:50 +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
-2
@@ -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 {}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user