Update Fix
This commit is contained in:
7
node_modules/mysql2/lib/connection_config.js
generated
vendored
7
node_modules/mysql2/lib/connection_config.js
generated
vendored
@@ -277,7 +277,10 @@ class ConnectionConfig {
|
||||
user: decodeURIComponent(parsedUrl.username),
|
||||
password: decodeURIComponent(parsedUrl.password),
|
||||
};
|
||||
parsedUrl.searchParams.forEach((value, key) => {
|
||||
for (const [key, value] of parsedUrl.searchParams) {
|
||||
if (key in options) {
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
// Try to parse this as a JSON expression first
|
||||
options[key] = JSON.parse(value);
|
||||
@@ -285,7 +288,7 @@ class ConnectionConfig {
|
||||
// Otherwise assume it is a plain string
|
||||
options[key] = value;
|
||||
}
|
||||
});
|
||||
}
|
||||
return options;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user