Skip to content

Commit

Permalink
Fix connection config parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
dresende committed Nov 21, 2023
1 parent 4bda23e commit e909c09
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/ConnectionConfig.js
Expand Up @@ -195,17 +195,15 @@ ConnectionConfig.parseUrl = function(url) {
}

if (url.searchParams) {
for (var key in url.searchParams) {
var value = url.searchParams[key];

url.searchParams.forEach(function (value, key) {
try {
// Try to parse this as a JSON expression first
options[key] = JSON.parse(value);
} catch (err) {
// Otherwise assume it is a plain string
options[key] = value;
}
}
});
} else if (url.query) {
for (var key in url.query) {
var value = url.query[key];
Expand Down

0 comments on commit e909c09

Please sign in to comment.