1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-10 11:43:01 +03:00

chore: guard against inherited properties

This commit is contained in:
Ruben Bridgewater
2017-05-27 01:01:42 +02:00
parent e33a642994
commit 8cca9ccf58
4 changed files with 24 additions and 13 deletions

View File

@@ -42,6 +42,9 @@ module.exports = function createClient (portArg, hostArg, options) {
if (parsed.search !== '') {
var elem
for (elem in parsed.query) {
if (!parsed.query.hasOwnProperty(elem)) {
continue
}
// If options are passed twice, only the parsed options will be used
if (elem in options) {
if (options[elem] === parsed.query[elem]) {