Skip to content

Commit f058365

Browse files
authored
Merge pull request #8 from bikov/feature/support-for-options-object
Feature/support for options object
2 parents c252ed0 + 843ad7b commit f058365

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ const redis = require('redis');
44
const commands = require('redis-commands').list;
55
const objectDecorator = require('./object-decorator');
66

7-
const AsyncRedis = function (...args) {
8-
const client = redis.createClient(args);
7+
const AsyncRedis = function (args) {
8+
const client = Array.isArray(args) ? redis.createClient(...args) : redis.createClient(args);
99
return AsyncRedis.decorate(client);
1010
};
1111

0 commit comments

Comments
 (0)